16 lines
645 B
C#
16 lines
645 B
C#
namespace Tiku.Infrastructure.Messaging;
|
|
|
|
public sealed class MessagingOptions
|
|
{
|
|
public string Host { get; set; } = string.Empty;
|
|
public string VirtualHost { get; set; } = "/";
|
|
public string Username { get; set; } = string.Empty;
|
|
public string Password { get; set; } = string.Empty;
|
|
public bool ConfigureConsumers { get; set; }
|
|
public int OutboxBacklogAlertCount { get; set; } = 1000;
|
|
public int OutboxOldestMessageAlertSeconds { get; set; } = 300;
|
|
|
|
public bool IsConfigured => Uri.TryCreate(Host, UriKind.Absolute, out var uri) &&
|
|
uri.Scheme is "rabbitmq" or "amqp" or "amqps";
|
|
}
|