MQContract.NATS 1.1.0

dotnet add package MQContract.NATS --version 1.1.0                
NuGet\Install-Package MQContract.NATS -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MQContract.NATS" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MQContract.NATS --version 1.1.0                
#r "nuget: MQContract.NATS, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 72 10/3/2024
1.0.0 91 8/8/2024