To use RabbitMQ as the underlying transport:
The RabbitMQ transport requires a connection string to connect to the broker. See connection settings for options on how to provide the connection string.
Routing topologies are used to control how queues, exchanges, and bindings are created on the RabbitMQ broker. In version 5 and above, selecting a routing topology is mandatory. For backwards compatibility, use the
ConventionalRoutingTopology, which was the previous default:
var transport = endpointConfiguration.UseTransport<RabbitMQTransport>(); transport.UseConventionalRoutingTopology();
See the routing topology documentation for further details.
- Provides native reliability and high-availability features.
- Offers a 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 the competing consumers pattern out of the box. Messages are received by instances in a round-robin fashion without additional configuration.
- Doesn't handle network partitions well; partitioning across a WAN requires using dedicated features.
- Requires careful consideration for 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 with other technologies, such as SQL Server, so it may require additional training.
- Might require covering additional costs of commercial RabbitMQ license and support.