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 we rely on the idempotence service.
Since RabbitMQ talks directly to a queue on any server it is suggested that you use an outbox that specifies a local queue just in case the remote queue is not immediately available.
If you need to install RabbitMQ you can follow these instructions.
The queue configuration is part of the specified uri, e.g.:
<inbox
workQueueUri="rabbitmq://username:password@host:port/virtualhost/queue?prefetchCount=25&durable=true&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 |
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"
/>
.
.
.
<configuration>