MessagingOptions.cs
779 bytes
| 1 | namespace SplitApp.Shared.Messaging; |
|---|---|
| 2 | |
| 3 | public class MessagingOptions |
| 4 | { |
| 5 | public const string SectionName = "Messaging:RabbitMq"; |
| 6 | |
| 7 | public string HostName { get; set; } = "localhost"; |
| 8 | public int Port { get; set; } = 5672; |
| 9 | public string UserName { get; set; } = "guest"; |
| 10 | public string Password { get; set; } = "guest"; |
| 11 | public string VirtualHost { get; set; } = "/"; |
| 12 | |
| 13 | /// <summary>Identifier used in queue naming (e.g. q.<ServiceName>.<MessageType>). Set per process.</summary> |
| 14 | public string ServiceName { get; set; } = "service"; |
| 15 | |
| 16 | public int RpcReplyTimeoutSeconds { get; set; } = 10; |
| 17 | |
| 18 | /// <summary>Polly initial-connect retry: max attempts before giving up.</summary> |
| 19 | public int InitialConnectRetryAttempts { get; set; } = 8; |
| 20 | } |
| 21 | |