RabbitMQ Transport

Project Hosting | Nuget: NServiceBus.RabbitMQ (Version: 2.x)
Target NServiceBus Version: 5.x

Provides support for sending messages over RabbitMQ using the RabbitMQ .NET Client.

Configuring the endpoint

To use RabbitMQ as the underlying transport:

Edit
busConfiguration.UseTransport<RabbitMQTransport>();

The RabbitMQ transport requires a connection string to connect to the broker. See Connection settings for options on how to provide the connection string.

Advantages and Disadvantages

Advantages

  • RabbitMQ provides native reliability and high-availability features.
  • Offers native Publish-Subscribe mechanism, therefore it doesn't require NServiceBus persistence for storing event subscriptions.
  • Wide range of supported clients allows for integrating the system with applications written in other languages using native RabbitMQ features.
  • Supports Competing consumers pattern out of the box. Messages are received by instances in a round-robin fashion without additional configuration.

Disadvantages

  • Doesn't handle network partitions well, partitioning across a WAN requires using dedicated features.
  • Requires careful consideration with regards to duplicate messages, e.g. using the Outbox feature or making all endpoints idempotent.
  • Many organizations don't have the same level of expertise with RabbitMQ, as for example with SQL Server, so it may require additional training.
  • Might require covering additional costs of commercial RabbitMQ license and support.

Samples

Related Articles


Last modified