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.
| Property | Initial Value |
|---|---|
| MaxMessages | 100 |
| AutoAcknowledge | false |
| Expires | TimeSpan.Zero |
| Heartbeat | TimeSpan.Zero |
| ConsumerName | null |
| StreamName | null |
Properties
AutoAcknowledge
Gets or sets a value indicating whether messages should be automatically acknowledged.
public bool AutoAcknowledge { get; set; }
Property Value
ConsumerName
Gets or sets the name of the NATS consumer.
public string ConsumerName { get; set; }
Property Value
Expires
Gets or sets the expiration time for messages in the queue.
public TimeSpan Expires { get; set; }
Property Value
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
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
StreamName
Gets or sets the name of the NATS stream.
public string StreamName { get; set; }
Property Value
Methods
ValidateOptions()
Validates the options for the NATS command queue.
public override void ValidateOptions()
Exceptions
- InvalidOperationException
StreamName or ConsumerName is null or whitespace.