MQContract.Kafka 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package MQContract.Kafka --version 1.0.0                
NuGet\Install-Package MQContract.Kafka -Version 1.0.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.Kafka" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MQContract.Kafka --version 1.0.0                
#r "nuget: MQContract.Kafka, 1.0.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.Kafka as a Cake Addin
#addin nuget:?package=MQContract.Kafka&version=1.0.0

// Install MQContract.Kafka as a Cake Tool
#tool nuget:?package=MQContract.Kafka&version=1.0.0                

<a name='assembly'></a>

MQContract.Kafka

Contents

<a name='T-MQContract-Kafka-Connection'></a>

Connection type

Namespace

MQContract.Kafka

Summary

This is the MessageServiceConnection implementation for using Kafka

Parameters
Name Type Description
clientConfig T:MQContract.Kafka.Connection

<a name='M-MQContract-Kafka-Connection-#ctor-Confluent-Kafka-ClientConfig-'></a>

#ctor(clientConfig) constructor

Summary

This is the MessageServiceConnection implementation for using Kafka

Parameters
Name Type Description
clientConfig Confluent.Kafka.ClientConfig

<a name='P-MQContract-Kafka-Connection-DefaultTimout'></a>

DefaultTimout property

Summary

The default timeout to use for RPC calls when not specified by the class or in the call. DEFAULT:1 minute if not specified inside the connection options

<a name='P-MQContract-Kafka-Connection-MaxMessageBodySize'></a>

MaxMessageBodySize property

Summary

The maximum message body size allowed

<a name='M-MQContract-Kafka-Connection-Dispose-System-Boolean-'></a>

Dispose(disposing) method

Summary

Called to dispose of the resources used

Parameters
Name Type Description
disposing System.Boolean Indicates if it is disposing

<a name='M-MQContract-Kafka-Connection-Dispose'></a>

Dispose() method

Summary

Called to dispose of the resources used

Parameters

This method has no parameters.

<a name='M-MQContract-Kafka-Connection-PingAsync'></a>

PingAsync() method

Summary

Not implemented as Kafka does not support this particular action

Returns

Throws NotImplementedException

Parameters

This method has no parameters.

Exceptions
Name Description
System.NotImplementedException Thrown because Kafka does not support this particular action

<a name='M-MQContract-Kafka-Connection-PublishAsync-MQContract-Messages-ServiceMessage,MQContract-Interfaces-Service-IServiceChannelOptions,System-Threading-CancellationToken-'></a>

PublishAsync(message,options,cancellationToken) method

Summary

Called to publish a message into the Kafka server

Returns

Transmition result identifying if it worked or not

Parameters
Name Type Description
message MQContract.Messages.ServiceMessage The service message being sent
options MQContract.Interfaces.Service.IServiceChannelOptions The service channel options, if desired, specifically the PublishChannelOptions which is used to access the storage capabilities of KubeMQ
cancellationToken System.Threading.CancellationToken A cancellation token
Exceptions
Name Description
MQContract.NoChannelOptionsAvailableException Thrown if options was supplied because there are no implemented options for this call

<a name='M-MQContract-Kafka-Connection-QueryAsync-MQContract-Messages-ServiceMessage,System-TimeSpan,MQContract-Interfaces-Service-IServiceChannelOptions,System-Threading-CancellationToken-'></a>

QueryAsync(message,timeout,options,cancellationToken) method

Summary

Called to publish a query into the Kafka server

Returns

The resulting response

Parameters
Name Type Description
message MQContract.Messages.ServiceMessage The service message being sent
timeout System.TimeSpan The timeout supplied for the query to response
options MQContract.Interfaces.Service.IServiceChannelOptions The options specifically for this call and must be supplied. Must be instance of QueryChannelOptions.
cancellationToken System.Threading.CancellationToken A cancellation token
Exceptions
Name Description
System.ArgumentNullException Thrown if options is null
MQContract.InvalidChannelOptionsTypeException Thrown if the options that was supplied is not an instance of QueryChannelOptions
System.ArgumentNullException Thrown if the ReplyChannel is blank or null as it needs to be set
MQContract.Kafka.QueryExecutionFailedException Thrown when the query fails to execute
MQContract.Kafka.QueryAsyncReponseException Thrown when the responding instance has provided an error
MQContract.Kafka.QueryResultMissingException Thrown when there is no response to be found for the query

<a name='M-MQContract-Kafka-Connection-SubscribeAsync-System-Action{MQContract-Messages-RecievedServiceMessage},System-Action{System-Exception},System-String,System-String,MQContract-Interfaces-Service-IServiceChannelOptions,System-Threading-CancellationToken-'></a>

SubscribeAsync(messageRecieved,errorRecieved,channel,group,options,cancellationToken) method

Summary

Called to create a subscription to the underlying Kafka server

Returns
Parameters
Name Type Description
messageRecieved System.Action{MQContract.Messages.RecievedServiceMessage} Callback for when a message is recieved
errorRecieved System.Action{System.Exception} Callback for when an error occurs
channel System.String The name of the channel to bind to
group System.String The group to subscribe as part of
options MQContract.Interfaces.Service.IServiceChannelOptions
cancellationToken System.Threading.CancellationToken
Exceptions
Name Description
MQContract.NoChannelOptionsAvailableException Thrown if options was supplied because there are no implemented options for this call

<a name='M-MQContract-Kafka-Connection-SubscribeQueryAsync-System-Func{MQContract-Messages-RecievedServiceMessage,System-Threading-Tasks-Task{MQContract-Messages-ServiceMessage}},System-Action{System-Exception},System-String,System-String,MQContract-Interfaces-Service-IServiceChannelOptions,System-Threading-CancellationToken-'></a>

SubscribeQueryAsync(messageRecieved,errorRecieved,channel,group,options,cancellationToken) method

Summary

Called to create a subscription for queries to the underlying Kafka server

Returns

A subscription instance

Parameters
Name Type Description
messageRecieved System.Func{MQContract.Messages.RecievedServiceMessage,System.Threading.Tasks.Task{MQContract.Messages.ServiceMessage}} Callback for when a query is recieved
errorRecieved System.Action{System.Exception} Callback for when an error occurs
channel System.String The name of the channel to bind to
group System.String The group to subscribe as part of
options MQContract.Interfaces.Service.IServiceChannelOptions Optional QueryChannelOptions to be supplied that will specify the ReplyChannel if not supplied by query message
cancellationToken System.Threading.CancellationToken A cancellation token
Exceptions
Name Description
MQContract.InvalidChannelOptionsTypeException Thrown when options is not null and is not an instance of the type QueryChannelOptions

<a name='T-MQContract-Kafka-Options-QueryChannelOptions'></a>

QueryChannelOptions type

Namespace

MQContract.Kafka.Options

Summary

Houses the QueryChannelOptions used for performing Query Response style messaging in Kafka

Parameters
Name Type Description
ReplyChannel T:MQContract.Kafka.Options.QueryChannelOptions The reply channel to use. This channel should be setup with a short retention policy, no longer than 5 minutes.

<a name='M-MQContract-Kafka-Options-QueryChannelOptions-#ctor-System-String-'></a>

#ctor(ReplyChannel) constructor

Summary

Houses the QueryChannelOptions used for performing Query Response style messaging in Kafka

Parameters
Name Type Description
ReplyChannel System.String The reply channel to use. This channel should be setup with a short retention policy, no longer than 5 minutes.

<a name='P-MQContract-Kafka-Options-QueryChannelOptions-ReplyChannel'></a>

ReplyChannel property

Summary

The reply channel to use. This channel should be setup with a short retention policy, no longer than 5 minutes.

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 86 10/3/2024
1.0.0 100 8/8/2024