Table of Contents

Class NatsCommandQueueOptions

Namespace
Savvyio.Extensions.NATS.Commands
Assembly
Savvyio.Extensions.NATS.dll

Configuration options for NatsCommandQueue.

public class NatsCommandQueueOptions : NatsMessageOptions, IValidatableParameterObject, IParameterObject
Inheritance
NatsCommandQueueOptions
Implements
Derived
Inherited Members

Constructors

NatsCommandQueueOptions()

Initializes a new instance of the NatsCommandQueueOptions class.

public NatsCommandQueueOptions()

Remarks

The following table shows the initial property values for an instance of NatsCommandQueueOptions.

PropertyInitial Value
MaxMessages100
AutoAcknowledgefalse
ExpiresTimeSpan.Zero
HeartbeatTimeSpan.Zero
ConsumerNamenull
StreamNamenull

Properties

AutoAcknowledge

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

public bool AutoAcknowledge { get; set; }

Property Value

bool

ConsumerName

Gets or sets the name of the NATS consumer.

public string ConsumerName { get; set; }

Property Value

string

Expires

Gets or sets the expiration time for messages in the queue.

public TimeSpan Expires { get; set; }

Property Value

TimeSpan

Remarks

If set to a value greater than or equal to 30 seconds, the Heartbeat property is automatically set to 5 seconds.

Heartbeat

Gets or sets the interval for the heartbeat signal sent from the NATS server.

public TimeSpan Heartbeat { get; set; }

Property Value

TimeSpan

Remarks

If Expires is set to a value greater than or equal to 30 seconds, this property is automatically set to 5 seconds.

MaxMessages

Gets or sets the maximum number of messages to process.

public int MaxMessages { get; set; }

Property Value

int

StreamName

Gets or sets the name of the NATS stream.

public string StreamName { get; set; }

Property Value

string

Methods

ValidateOptions()

Validates the options for the NATS command queue.

public override void ValidateOptions()

Exceptions

InvalidOperationException

StreamName or ConsumerName is null or whitespace.

See Also