MQContract.NATS
1.1.0
dotnet add package MQContract.NATS --version 1.1.0
NuGet\Install-Package MQContract.NATS -Version 1.1.0
<PackageReference Include="MQContract.NATS" Version="1.1.0" />
paket add MQContract.NATS --version 1.1.0
#r "nuget: MQContract.NATS, 1.1.0"
// Install MQContract.NATS as a Cake Addin #addin nuget:?package=MQContract.NATS&version=1.1.0 // Install MQContract.NATS as a Cake Tool #tool nuget:?package=MQContract.NATS&version=1.1.0
<a name='assembly'></a>
MQContract.NATS
Contents
<a name='T-MQContract-NATS-Connection'></a>
Connection type
Namespace
MQContract.NATS
Summary
This is the MessageServiceConnection implementation for using NATS.io
<a name='M-MQContract-NATS-Connection-#ctor-NATS-Client-Core-NatsOpts-'></a>
#ctor(options) constructor
Summary
Primary constructor to create an instance using the supplied configuration options.
Parameters
Name | Type | Description |
---|---|---|
options | NATS.Client.Core.NatsOpts |
<a name='P-MQContract-NATS-Connection-DefaultTimeout'></a>
DefaultTimeout property
Summary
The default timeout to use for RPC calls when not specified by class or in the call. DEFAULT: 30 seconds
<a name='P-MQContract-NATS-Connection-MaxMessageBodySize'></a>
MaxMessageBodySize property
Summary
The maximum message body size allowed. DEFAULT: 1MB
<a name='M-MQContract-NATS-Connection-CreateStreamAsync-NATS-Client-JetStream-Models-StreamConfig,System-Threading-CancellationToken-'></a>
CreateStreamAsync(streamConfig,cancellationToken) method
Summary
Called to define a Stream inside the underlying NATS context. This is an exposure of the NatsJSContext.CreateStreamAsync
Returns
The stream creation result
Parameters
Name | Type | Description |
---|---|---|
streamConfig | NATS.Client.JetStream.Models.StreamConfig | The configuration settings for the stream |
cancellationToken | System.Threading.CancellationToken | A cancellation token |
<a name='M-MQContract-NATS-Connection-RegisterConsumerConfig-System-String,NATS-Client-JetStream-Models-ConsumerConfig-'></a>
RegisterConsumerConfig(channelName,consumerConfig) method
Summary
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
Returns
The underlying connection to allow for chaining
Parameters
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 |
<a name='T-MQContract-NATS-UnableToConnectException'></a>
UnableToConnectException type
Namespace
MQContract.NATS
Summary
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.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- MQContract.Abstractions (>= 1.1.0)
- NATS.Net (>= 2.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.