BarebonesRabbitMQImplementationLibrary 6.0.3
dotnet add package BarebonesRabbitMQImplementationLibrary --version 6.0.3
NuGet\Install-Package BarebonesRabbitMQImplementationLibrary -Version 6.0.3
<PackageReference Include="BarebonesRabbitMQImplementationLibrary" Version="6.0.3" />
paket add BarebonesRabbitMQImplementationLibrary --version 6.0.3
#r "nuget: BarebonesRabbitMQImplementationLibrary, 6.0.3"
// Install BarebonesRabbitMQImplementationLibrary as a Cake Addin #addin nuget:?package=BarebonesRabbitMQImplementationLibrary&version=6.0.3 // Install BarebonesRabbitMQImplementationLibrary as a Cake Tool #tool nuget:?package=BarebonesRabbitMQImplementationLibrary&version=6.0.3
Barebones RabbitMQ Implementation Library
This is a barebones implementation for RabbitMQProducer and RabbitMQSubscriber classes meant primarily for my educational/personal use.
It has an Env class that watches for RABBITMQ_CONTAINER_NAME, RABBITMQ_USER_NAME, RABBITMQ_USER_PASS, and RABBITMQ_PORT in the configuration meant for DI. This provides static names for environment variables used for RabbitMQ.
It provides a message producer with a simple SendQueue(string targetQueue, T message) method, this will declare a queue if a matching one does not exist and send an object as JSON onto the queue.
It provides a message subscriber with FetchAndAcknowledgeNextIfExists(string queue) that grabs the next message if there is one and Subscribe<D>(string queueKey, Action<D> onNext, Action<Exception> onError) which declares a queue with that name if one does not already exist and handles received objects by passing them onto the onNext action or onError action depending on whether deserialization and other aspects are done successfully.
Additionally, it provides IMessageProducer and IMessageSubscriber as interfaces meant for message broker implementations. It currently lacks unit testing. And for the initial setup, a Message model class with Title and Body properties is included.
6.0.3 Changes
Adds a LoggingHelper class with a static method that helps to provide a consistent log message format for including DataWithCorrelation information in specific logs.
6.0.2 Changes
Adds a new EventResponse class and renames the file EventWithCorrelation to DataWithCorrelation to match the class inside. The new EventResponse class extends DataWithCorrelation to include ResponseCode and Message as two additional fields. This is a barebones way to indicate back to other services whether they had their event carried out successfully.
6.0.1 Changes
A new DataWithCorrelation class was created. It can be used as a parent class for data sent between microservices in order to provide tracking of events for logging across multiple microservices.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net6.0
- Microsoft.AspNetCore.Connections.Abstractions (>= 7.0.4)
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.0)
- Newtonsoft.Json (>= 13.0.3)
- RabbitMQ.Client (>= 6.5.0)
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 |
---|---|---|
6.0.3 | 193 | 4/18/2023 |