MQContract.NATS
This is the MessageServiceConnection implementation for using NATS.io
Primary constructor to create an instance using the supplied configuration options.
| Name | Type | Description |
|---|---|---|
| options | NATS.Client.Core.NatsOpts |
The default timeout to use for RPC calls when not specified by class or in the call. DEFAULT: 30 seconds
The maximum message body size allowed. DEFAULT: 1MB
Houses the underlying NATS service connection being used
Houses the underlying JetStream conext being used
Called to define a Stream inside the underlying NATS context. This is an exposure of the NatsJSContext.CreateStreamAsync
The stream creation result
| Name | Type | Description |
|---|---|---|
| streamConfig | NATS.Client.JetStream.Models.StreamConfig | The configuration settings for the stream |
| cancellationToken | System.Threading.CancellationToken | A cancellation token |
Called to register a consumer configuration for a given channel. This is only used for stream channels and allows for configuring storing and reading patterns
The underlying connection to allow for chaining
| Name | Type | Description |
|---|---|---|
| channelName | System.String | The underlying stream name that this configuration applies to |
| consumerConfig | NATS.Client.JetStream.Models.ConsumerConfig | The consumer configuration to use for that stream |
MQContract.NATS
Thrown when a query response error is recieved through the system
MQContract.NATS
Thrown when an error occurs attempting to connect to the NATS server.
Specifically this will be thrown when the Ping that is executed on each initial connection fails.