Table of Contents

RabbitMqCommandQueueOptions Class

Definition

Configuration options for RabbitMqCommandQueue.

public class RabbitMqCommandQueueOptions : RabbitMqMessageOptions, IValidatableParameterObject, IParameterObject
Inheritance
object
RabbitMqCommandQueueOptions
Implements
Derived
Inherited Members

Examples

Configure a RabbitMqCommandQueueOptions with the AMQP URL and queue settings required for durable RabbitMQ command delivery.

using System;
using Savvyio.Extensions.RabbitMQ.Commands;

namespace ExampleApp;

public class RabbitMqCommandSetup
{
    public static RabbitMqCommandQueueOptions CreateOptions()
    {
        var options = new RabbitMqCommandQueueOptions
        {
            AmqpUrl = new Uri("amqp://guest:guest@localhost:5672"),
            QueueName = "account-commands",
            Durable = true,
            Persistent = true,
            AutoAcknowledge = false
        };
        return options;
    }
}

Constructors

Name Description
RabbitMqCommandQueueOptions()

Initializes a new instance of the RabbitMqCommandQueueOptions class with default values.

Properties

Name Description
AutoAcknowledge

Gets or sets a value indicating whether messages should be automatically acknowledged.

AutoDelete

Gets or sets a value indicating whether the queue should be automatically deleted when no longer in use.

Durable

Gets or sets a value indicating whether the queue should be durable.

Exclusive

Gets or sets a value indicating whether the queue should be exclusive.

QueueName

Gets or sets the name of the queue.

Methods

Name Description
ValidateOptions()

Determines whether the public read-write properties of this instance are in a valid state.

See Also