HyperDev.ActiveMQ 1.2.1

dotnet add package HyperDev.ActiveMQ --version 1.2.1
                    
NuGet\Install-Package HyperDev.ActiveMQ -Version 1.2.1
                    
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="HyperDev.ActiveMQ" Version="1.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HyperDev.ActiveMQ" Version="1.2.1" />
                    
Directory.Packages.props
<PackageReference Include="HyperDev.ActiveMQ" />
                    
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 HyperDev.ActiveMQ --version 1.2.1
                    
#r "nuget: HyperDev.ActiveMQ, 1.2.1"
                    
#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 HyperDev.ActiveMQ@1.2.1
                    
#: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=HyperDev.ActiveMQ&version=1.2.1
                    
Install as a Cake Addin
#tool nuget:?package=HyperDev.ActiveMQ&version=1.2.1
                    
Install as a Cake Tool

HyperDev.ActiveMQ

Typed JSON messaging for ActiveMQ Artemis, built on ArtemisNetClient, part of the HyperDev Fatum framework.

  • Named broker endpoints from the ActiveMQ configuration section (IEndpointManager, registered with AddEndpointFactory, with an EndpointResolving event for custom resolution)
  • AddActiveMq(configuration, name, aliases): registers an ArtemisNetClient connection on the configured endpoints
  • Typed consumers (ITypedConsumer<TMessage>, AddTypedConsumer): JSON body deserialized, consumer resolved in a DI scope, message accepted on success and rejected (and logged) on exception
  • Typed producers (ITypedProducer<TMessage>, MessageProducer<TMessage>): messages serialized to JSON with Newtonsoft.Json

Installation

dotnet add package HyperDev.ActiveMQ

Quick start

{
  "ActiveMQ": {
    "Endpoints": [
      { "Name": "Primary", "Server": "localhost", "Port": 5672, "User": "artemis", "Password": "artemis", "Scheme": "Amqp" }
    ]
  }
}
using ActiveMQ.Artemis.Client;
using ActiveMQ.Artemis.Client.Extensions.DependencyInjection;
using ActiveMQ.Artemis.Client.Extensions.Hosting;
using HyperDev.ActiveMQ;
using HyperDev.DependencyInjection;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddScoped<OrderCreatedConsumer>();

var activeMq = builder.Services.AddActiveMq(builder.Configuration, "orders-bus", "Primary");

activeMq.AddTypedConsumer<OrderCreated, OrderCreatedConsumer>("orders", RoutingType.Anycast, new ConsumerOptions());

builder.Services.AddActiveMqHostedService();

builder.Build().Run();

public record OrderCreated(int OrderId, decimal Total);

public class OrderCreatedConsumer : ITypedConsumer<OrderCreated>
{
    public Task ConsumeAsync(OrderCreated message, ConsumerContext context)
    {
        Console.WriteLine($"Order {message.OrderId} created, total {message.Total}");

        return Task.CompletedTask;
    }
}

Requirements

An Apache ActiveMQ Artemis broker reachable over AMQP (Scheme: Amqp, Amqps, Ws or Wss).

Target frameworks

.NET 8.0, .NET 10.0

License

MIT, © Ivan Senatore, Wemake Informatica srl. Third-party dependencies keep their own licenses (ArtemisNetClient and its extensions: MIT, Newtonsoft.Json: MIT, Microsoft.Extensions.*: MIT).

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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  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.2.1 87 11/7/2026
1.2.0 163 7/29/2026
1.0.0.1 312 3/28/2025
1.0.0 289 3/27/2025