Simple.Bus 1.0.3-alpha

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

// Install Simple.Bus as a Cake Tool
#tool nuget:?package=Simple.Bus&version=1.0.3-alpha&prerelease                

Simple Bus

A simple way to receive and send message to Azure Service Bus and RabbitMq

Installation

You can install through nuget

Configuration

Receive

  • Azure Service Bus

You should use the class ReceiverConfigurationAzureServiceBus to configure service bus.

services
	.AddBusReceiverFor<YourMessage>(builder => builder
		.UseMessageHandler((message) => 
		{
			Console.WriteLine($"Message received {message}");
			return Task.Completed;
		})
		.UseLogger(logger)
		.UseAzureServiceBus(receiverConfigurationAzureServiceBus));
  • RabbitMQ

You should use the class ReceiverConfigurationRabbitMQ to configure rabbitMQ.

services
	.AddBusReceiverFor<YourMessage>(builder => builder
   		.UseMessageHandler((message) =>
   		{
   			Console.WriteLine($"Receive message for rabbit mq: {message.Nome}");
   			return Task.CompletedTask;
   		})
   		.UseRabbitMQ(handlerConfigurationRabbitMQ));

After that, you can inject ReceiverBuilderFor<T>

Send

  • RabbitMQ
var sender = new SenderPipelineBuilderFor<YourMessage>().UseRabbitMq(credentials, exchange).Build();

  • Azure Service Bus
var sender = new SenderPipelineBuilderFor<YourMessage>().UseAzureServiceBus(connectionString, topicName).Build();

or

services.AddBusSenderFor<YourMessage>(builder => builder.UseAzureServiceBus(connectionString, topicName));

Samples

There are four samples:

  • Samples/Simple.Bus.Sample.Producer.AzureServiceBus
  • Samples/Simple.Bus.Sample.Producer.RabbitMQ
  • Samples/Simple.Bus.Sample.Receiver
  • Samples/Simple.Bus.ReceiverDeadLetter

Extensions

You can extend Serialization, Cryptography, Pipeline and Logging.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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.  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. 
.NET Core netcoreapp3.0 is compatible.  netcoreapp3.1 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
2.0.3 3,398 4/23/2021
2.0.3-beta.2 282 4/15/2021
2.0.3-beta.1 158 4/15/2021
2.0.2-beta.4 3,039 2/15/2021
2.0.2-beta.3 154 2/15/2021
2.0.2-beta.2 264 10/28/2020
2.0.2-beta.1 391 6/20/2020
2.0.1-beta.9 266 6/18/2020
2.0.1-beta.8 483 2/12/2020
2.0.1-beta.7 344 2/12/2020
2.0.1-beta.6 359 2/12/2020
2.0.1-beta.5 402 1/21/2020
2.0.1-beta.4 288 11/13/2019
2.0.1-beta.3 264 11/7/2019
2.0.1-beta.2 259 11/7/2019
2.0.1-beta.1 261 11/6/2019
2.0.1-beta 404 11/5/2019
2.0.0-beta 378 11/4/2019
1.0.3-alpha 590 10/28/2019