92 lines
2.6 KiB
C#
92 lines
2.6 KiB
C#
using xEventService.Constants;
|
|
|
|
namespace xEventService.Models
|
|
{
|
|
/// <summary>
|
|
/// RabbitMQ-specific connection and messaging options ...
|
|
/// </summary>
|
|
public class XRabbitMQOptions
|
|
{
|
|
|
|
/// <summary>
|
|
/// Connection Username ...
|
|
/// </summary>
|
|
public string Username { get; set; } = "guest";
|
|
|
|
/// <summary>
|
|
/// Connection Password ...
|
|
/// </summary>
|
|
public string Password { get; set; } = "guest";
|
|
|
|
/// <summary>
|
|
/// Virtual Host ...
|
|
/// </summary>
|
|
public string VirtualHost { get; set; } = "/";
|
|
|
|
/// <summary>
|
|
/// Default Exchange Name ...
|
|
/// </summary>
|
|
public string Exchange { get; set; } = "x.saherelm.events";
|
|
|
|
/// <summary>
|
|
/// Default Exchange Type (fanout, direct, topic, headers) ...
|
|
/// </summary>
|
|
public XRabbitMQExchangeType ExchangeType { get; set; } = XRabbitMQExchangeType.Fanout;
|
|
|
|
/// <summary>
|
|
/// Default Queue Name ...
|
|
/// if empty, a dynamic queue will be generated ...
|
|
/// </summary>
|
|
public string Queue { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Default Routing Key ...
|
|
/// </summary>
|
|
public string RoutingKey { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Exchange Durable Flag ...
|
|
/// </summary>
|
|
public bool ExchangeDurable { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Exchange AutoDelete Flag ...
|
|
/// </summary>
|
|
public bool ExchangeAutoDelete { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Queue Durable Flag ...
|
|
/// </summary>
|
|
public bool QueueDurable { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Queue Exclusive Flag ...
|
|
/// </summary>
|
|
public bool QueueExclusive { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Queue AutoDelete Flag ...
|
|
/// </summary>
|
|
public bool QueueAutoDelete { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Enable Automatic Recovery on Connection Loss ...
|
|
/// </summary>
|
|
public bool AutomaticRecoveryEnabled { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Network Recovery Interval in Seconds ...
|
|
/// </summary>
|
|
public int NetworkRecoveryIntervalSeconds { get; set; } = 5;
|
|
|
|
/// <summary>
|
|
/// Prefetch Count for Consumer ...
|
|
/// </summary>
|
|
public ushort PrefetchCount { get; set; } = 1;
|
|
|
|
/// <summary>
|
|
/// Enable Manual Acknowledgement ...
|
|
/// </summary>
|
|
public bool ManualAck { get; set; } = true;
|
|
}
|
|
} |