Skip to content
RabbitMQ implementation for use with Shuttle.Esb.
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.media
Shuttle.Esb.RabbitMQ.Tests
Shuttle.Esb.RabbitMQ
.gitignore
LICENSE
README.md
Shuttle.Esb.RabbitMQ.sln

README.md

RabbitMQQueue

RabbitMQ does not provide 2-phase commit out-of-the-box. Although implementing it is not too much effort the 2PC adds tremendous overhead (as it does for anything). For this reason shuttle does not use 2PC with RabbitMQ.

Instead you can make use of an idempotence service.

RabbitMQ talks directly to a queue on any server it is recommended that you use an outbox that specifies a local queue just in case the remote queue is not immediately available.

Installation

If you need to install RabbitMQ you can follow these instructions.

Configuration

The queue configuration is part of the specified uri, e.g.:

<inbox
    workQueueUri="rabbitmq://username:password@host:port/virtualhost/queue?prefetchCount=25&amp;durable=true&amp;persistent=true"
    .
    .
    .
/>
Segment / Argument Default Description Version Introduced
username:password empty
virtualhost /
port default
prefetchcount 25 Specifies the number of messages to prefetch from the queue.
durable true Determines whether the queue is durable. Note: be very mindful of the possible consequences before setting to 'false'. v3.5.0
persistent true Determines whether messages will be persisted. Note: be very mindful of the possible consequences before setting to 'false'. v3.5.3
priority empty Determines the number of priorities supported by the queue. v10.0.10

In addition to this there is also a RabbitMQ specific section (defaults specified here):

<configuration>
  <configSections>
    <section name='rabbitmq' type="Shuttle.Esb.RabbitMQ.RabbitMQSection, Shuttle.Esb.RabbitMQ"/>
  </configSections>
  
  <rabbitmq
    localQueueTimeoutMilliseconds="250"
    remoteQueueTimeoutMilliseconds="2000"
    connectionCloseTimeoutMilliseconds="1000"
    requestedHeartbeat="30"
    operationRetryCount="3"
    useBackgroundThreadsForIO="true"
  />
  .
  .
  .
<configuration>

A RabbitMQConfiguration instance implementing the IRabbitMQConfiguration interface will be registered using the container bootstrapping. If you wish to override the configuration you should register your instance before calling the ServiceBus.Register() method.

You can’t perform that action at this time.