Files
DigitalData.MessagingService/src/DigitalData.MessagingService.Infrastructure/Messaging/RabbitMqConfiguration.cs

55 lines
1.5 KiB
C#

namespace DigitalData.MessagingService.Infrastructure.Messaging;
/// <summary>
/// Configuration for RabbitMQ connection
/// </summary>
public class RabbitMqConfiguration
{
/// <summary>
/// Configuration section name in appsettings.json
/// </summary>
public const string SectionName = "RabbitMQ";
/// <summary>
/// RabbitMQ server hostname
/// </summary>
public string HostName { get; set; } = "localhost";
/// <summary>
/// RabbitMQ AMQP port (default: 5672)
/// </summary>
public int Port { get; set; } = 5672;
/// <summary>
/// RabbitMQ username
/// </summary>
public string UserName { get; set; } = "guest";
/// <summary>
/// RabbitMQ password
/// </summary>
public string Password { get; set; } = "guest";
/// <summary>
/// Virtual host (default: /)
/// </summary>
public string VirtualHost { get; set; } = "/";
/// <summary>
/// Enable automatic recovery on connection failure
/// </summary>
public bool AutomaticRecoveryEnabled { get; set; } = true;
/// <summary>
/// Network recovery interval in seconds
/// </summary>
public int NetworkRecoveryIntervalSeconds { get; set; } = 10;
public string QueueName { get; set; } = null!;
public string ExchangeName { get; set; } = null!;
public string RoutingKey { get; set; } = null!;
public string DlqQueueName { get; set; } = null!;
public string DlqExchangeName { get; set; } = null!;
public string DlqRoutingKey { get; set; } = null!;
}