RabbitMqTopology.cs
543 bytes
| 1 | namespace SplitApp.Shared.Messaging; |
|---|---|
| 2 | |
| 3 | public static class RabbitMqTopology |
| 4 | { |
| 5 | public const string EventsExchange = "splitapp.events"; |
| 6 | public const string RequestsExchange = "splitapp.requests"; |
| 7 | |
| 8 | public const string EventsExchangeType = "topic"; |
| 9 | public const string RequestsExchangeType = "direct"; |
| 10 | |
| 11 | /// <summary>Stable per-service durable queue name for handler subscriptions.</summary> |
| 12 | public static string HandlerQueueName(string serviceName, string messageTypeName) => |
| 13 | $"q.{serviceName}.{messageTypeName}"; |
| 14 | } |
| 15 | |