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. 
.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 2,028 4/23/2021
2.0.3-beta.2 256 4/15/2021
2.0.3-beta.1 140 4/15/2021
2.0.2-beta.4 2,702 2/15/2021
2.0.2-beta.3 139 2/15/2021
2.0.2-beta.2 249 10/28/2020
2.0.2-beta.1 375 6/20/2020
2.0.1-beta.9 250 6/18/2020
2.0.1-beta.8 467 2/12/2020
2.0.1-beta.7 328 2/12/2020
2.0.1-beta.6 343 2/12/2020
2.0.1-beta.5 385 1/21/2020
2.0.1-beta.4 272 11/13/2019
2.0.1-beta.3 248 11/7/2019
2.0.1-beta.2 243 11/7/2019
2.0.1-beta.1 246 11/6/2019
2.0.1-beta 376 11/5/2019
2.0.0-beta 348 11/4/2019
1.0.3-alpha 565 10/28/2019