VOOZH about

URL: https://www.nuget.org/packages/Axanndar.Consumer/

⇱ NuGet Gallery | Axanndar.Consumer 1.1.0




👁 Image
Axanndar.Consumer 1.1.0

dotnet add package Axanndar.Consumer --version 1.1.0
 
 
NuGet\Install-Package Axanndar.Consumer -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="Axanndar.Consumer" Version="1.1.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Axanndar.Consumer" Version="1.1.0" />
 
Directory.Packages.props
<PackageReference Include="Axanndar.Consumer" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Axanndar.Consumer --version 1.1.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Axanndar.Consumer, 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.
#:package Axanndar.Consumer@1.1.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Axanndar.Consumer&version=1.1.0
 
Install as a Cake Addin
#tool nuget:?package=Axanndar.Consumer&version=1.1.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

👁 License: MIT
👁 Nuget
👁 NuGet Downloads
👁 issues - Axanndar.Consumer

Axanndar.Consumer

This .NET library adds an abstraction layer over ActiveMQ Artemis, handling connection creation, consumer instantiation, and automatic re-creation in case of failures. It provides tools to easily implement new consumers by extending a base class (BaseConsumer), and facilitates dependency injection of consumers via configuration (appsettings.json) or code.

Create new Consumer

 public class FooConsumer : BaseConsumer
 {
 public FooConsumer(Axanndar.Consumer.Models.ConsumerConfiguration consumerConfiguration, IArtemisClientConnectionFactory connectionFactory) : base(consumerConfiguration, connectionFactory)
 {
 }

 public override async Task ReceiveMessage(Message message)
 {
 Console.WriteLine($"FooConsumer - Received message with ID: {message.MessageId}");
 await Accept(message);
 }
 }

 public class DummyConsumer : BaseConsumer
 {
 public DummyConsumer(Axanndar.Consumer.Models.ConsumerConfiguration consumerConfiguration, IArtemisClientConnectionFactory connectionFactory) : base(consumerConfiguration, connectionFactory)
 {
 }

 public override async Task ReceiveMessage(Message message)
 {
 Console.WriteLine($"FooConsumer - Received message with ID: {message.MessageId}");
 await Reject(message);
 }
 }

Service registration

appsettings.json

{
 "Amqp": {
 "FooConsumer": {
 "RetryTime": 5000,
 "IsActive": true,
 "Address": "my-address",
 "Queue": "my-queue",
 "RoutingType": 0,
 "Credit": 200,
 "Durable": false,
 "FilterExpression": "",
 "NoLocalFilter": false,
 "Shared": false,
 "Endpoints": [
 {
 "Host": "localhost",
 "Port": 5672,
 "User": "user",
 "Password": "password"
 }
 ]
 }
 }
}

You can register the Consumer service simply with dependency injection:

 // Via options configuration
 IConfiguration config = ...;
 services
 .AddConsumerBackgroundService<FooConsumer>("FooConsumer", config);

 // Via code configuration
 services
 .AddConsumerBackgroundService<DummyConsumer>(new Axanndar.Consumer.Models.ConsumerConfiguration
 {
 IdEndpoint = "DummyConsumer",
 Address = "DummyConsumer.Address",
 Queue = "DummyConsumer.Queue",
 Endpoints = new List<Axanndar.Consumer.Models.ConsumerConfigurationEndpoint> {
 new Axanndar.Consumer.Models.ConsumerConfigurationEndpoint
 {
 Host = "localhost",
 Port = 61616,
 Password = "password",
 User = "user"
 }
 }, 
 IsActive = true,
 RetryTime = 5,
 RoutingType = (int)RoutingType.Anycast,
 });

Licensee

Repository source code is available under MIT License, see license in the source.

Contributing

Thank you for considering to help out with the source code! If you'd like to contribute, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base.

Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.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 129 2/10/2026
1.0.1 409 11/26/2025