public static IRabbitMQQueueBuilder <TPayload> Quorum <TPayload>(
            this IRabbitMQQueueBuilder <TPayload> builder,
            int?initialGroupSize = null)
        {
            builder.Argument("x-queue-type", "quorum");

            if (initialGroupSize != null)
            {
                builder.Argument("x-quorum-initial-group-size", initialGroupSize);
            }

            return(builder);
        }
        private static IRabbitMQQueueBuilder <TPayload> DeadLetterTo <TPayload>(
            this IRabbitMQQueueBuilder <TPayload> builder,
            IRabbitMQExchangeBuilderCore exchange,
            string routingKey)
        {
            if (exchange is null)
            {
                throw new ArgumentNullException(nameof(exchange));
            }

            if (routingKey != null)
            {
                builder.Argument("x-dead-letter-routing-key", routingKey);
            }

            return(builder.Argument("x-dead-letter-exchange", exchange.ExchangeDeclaration.Name));
        }
 /// <summary>
 ///   Declare x-max-length-bytes argument. When size limit reached, message will be marked as dead
 /// </summary>
 public static IRabbitMQQueueBuilder <TPayload> MaxMessageSize <TPayload>(
     this IRabbitMQQueueBuilder <TPayload> builder,
     uint bytes)
 {
     return(builder.Argument("x-max-length-bytes", bytes));
 }
 /// <summary>
 ///   Declare x-max-length argument. When queue message limit reached, see
 ///   <see cref="RejectPublish{TPayload}" />
 /// </summary>
 public static IRabbitMQQueueBuilder <TPayload> MaxMessageCount <TPayload>(
     this IRabbitMQQueueBuilder <TPayload> builder,
     uint count)
 {
     return(builder.Argument("x-max-length", count));
 }
 /// <summary>
 ///   Declare x-queue-mode argument to lazy (default "default")
 /// </summary>
 public static IRabbitMQQueueBuilder <TPayload> Lazy <TPayload>(this IRabbitMQQueueBuilder <TPayload> builder)
 {
     return(builder.Argument("x-queue-mode", "lazy"));
 }
 public static IRabbitMQQueueBuilder <TPayload> SingleActiveConsumer <TPayload>(
     this IRabbitMQQueueBuilder <TPayload> builder)
 {
     return(builder.Argument("x-single-active-consumer", true));
 }
 /// <summary>
 ///   Declare x-overflow argument to reject-publish (default drop-head)
 /// </summary>
 public static IRabbitMQQueueBuilder <TPayload> RejectPublish <TPayload>(
     this IRabbitMQQueueBuilder <TPayload> builder)
 {
     return(builder.Argument("x-overflow", "reject-publish"));
 }
 /// <summary>
 ///   Declare x-max-priority argument for queue (default 0)
 /// </summary>
 public static IRabbitMQQueueBuilder <TPayload> MaxPriority <TPayload>(
     this IRabbitMQQueueBuilder <TPayload> builder,
     byte priority)
 {
     return(builder.Argument("x-max-priority", priority));
 }
 /// <summary>
 ///   Declare x-message-ttl argument. When expires message will be marked as dead
 /// </summary>
 public static IRabbitMQQueueBuilder <TPayload> MessageTimeToLive <TPayload>(
     this IRabbitMQQueueBuilder <TPayload> builder,
     TimeSpan timeToLive)
 {
     return(builder.Argument("x-message-ttl", timeToLive.Milliseconds));
 }
 /// <summary>
 ///   Declare x-expires argument for queue. When expires queue will be deleted
 /// </summary>
 public static IRabbitMQQueueBuilder <TPayload> TimeToLive <TPayload>(
     this IRabbitMQQueueBuilder <TPayload> builder,
     TimeSpan timeToLive)
 {
     return(builder.Argument("x-expires", timeToLive.Milliseconds));
 }