Muflone.Transport.RabbitMQ.Saga
6.2.1
dotnet add package Muflone.Transport.RabbitMQ.Saga --version 6.2.1
NuGet\Install-Package Muflone.Transport.RabbitMQ.Saga -Version 6.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="Muflone.Transport.RabbitMQ.Saga" Version="6.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Muflone.Transport.RabbitMQ.Saga --version 6.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Muflone.Transport.RabbitMQ.Saga, 6.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.
// Install Muflone.Transport.RabbitMQ.Saga as a Cake Addin
#addin nuget:?package=Muflone.Transport.RabbitMQ.Saga&version=6.2.1
// Install Muflone.Transport.RabbitMQ.Saga as a Cake Tool
#tool nuget:?package=Muflone.Transport.RabbitMQ.Saga&version=6.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Muflone Transport RabbitMQ Saga
Muflone extension to manage sagas on RabbitMQ.
Install
Install-Package Muflone.Transport.RabbitMQ.Saga
Implementation
To implement a saga register
public static IServiceCollection AddRabbitMq(this IServiceCollection services, RabbitMqSettings rabbitMqSettings)
{
var serviceProvider = services.BuildServiceProvider();
var repository = serviceProvider.GetRequiredService<IRepository>();
var loggerFactory = serviceProvider.GetService<ILoggerFactory>();
var rabbitMQConfiguration = new RabbitMQConfiguration(rabbitMqSettings.Host, rabbitMqSettings.Username, rabbitMqSettings.Password, rabbitMqSettings.ExchangeCommandName, rabbitMqSettings.ExchangeEventName);
var connectionFactory = new MufloneConnectionFactory(rabbitMQConfiguration, loggerFactory!);
services.AddMufloneTransportRabbitMQ(loggerFactory, rabbitMQConfiguration);
serviceProvider = services.BuildServiceProvider();
services.AddMufloneRabbitMQConsumers(new List<IConsumer>
{
new BeersReceivedConsumer(serviceProvider.GetRequiredService<IServiceBus>(),
connectionFactory,
loggerFactory),
new CreateBeerConsumer(repository!, connectionFactory,
loggerFactory),
new BeerCreatedConsumer(serviceProvider.GetRequiredService<IBeerService>(),
connectionFactory,
loggerFactory),
new LoadBeerInStockConsumer(repository!, connectionFactory,
loggerFactory),
new BeerLoadedInStockConsumer(serviceProvider.GetRequiredService<IBeerService>(),
connectionFactory,
loggerFactory),
new StartBeersReceivedSagaConsumer(serviceProvider.GetRequiredService<IServiceBus>(),
serviceProvider.GetRequiredService<ISagaRepository>(),
repository!,
connectionFactory,
loggerFactory),
new BeerCreatedSagaConsumer(serviceProvider.GetRequiredService<IServiceBus>(),
serviceProvider.GetRequiredService<ISagaRepository>(),
connectionFactory,
loggerFactory),
new BeerLoadedInStockSagaConsumer(serviceProvider.GetRequiredService<IServiceBus>(),
serviceProvider.GetRequiredService<ISagaRepository>(),
connectionFactory,
loggerFactory)
});
return services;
}
Fully working example
You can find a fully working example here: https://github.com/BrewUp/
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Muflone.Saga (>= 6.2.0)
- Muflone.Transport.RabbitMQ (>= 6.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.