THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Maven users will need to add the following dependency to their pom.xml
for this component:
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-rabbitmq</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
|
URI format
Code Block |
---|
rabbitmq://hostname[:port]/exchangeName?[options]
|
...
Wiki Markup |
---|
{div:class=confluenceTableSmall} || Property || Default || Description || | {{autoAck}} | {{true}} | If messages should be auto acknowledged | | {{autoDelete}} | {{true}} | If it is true, the exchange will be deleted when it is no longer in use | | {{durable}} | {{true}} | If we are declaring a durable exchange (the exchange will survive a server restart) | | {{queue}} | {{random uuid}} | The queue to receive messages from | | {{routingKey}} | {{null}} | The routing key to use when binding a consumer queue to the exchange. For producer routing keys, you set the header (see header section) | | {{threadPoolSize}} | {{10}} | The consumer uses a Thread Pool Executor with a fixed number of threads. This setting allows you to set that number of threads. | | {{username}} | {{null}} | username in case of authenticated access | | {{password}} | {{null}} | password for authenticated access | | {{vhost}} | {{/}} | the vhost for the channel | | {{exchangeType}} | {{direct}} | *Camel 2.12.2:* The exchange type such as direct or topic. | | {{bridgeEndpoint}} | {{false}} | *Camel 2.12.3:* If the bridgeEndpoint is true, the producer will ignore the message of rabbitmq.EXCHANGE_NAME | | {{addresses}} | {{null}} | *Camel 2.12.3:* If this option is set, camel-rabbitmq will try to create connection based on the setting of option addresses. The addresses value is a string which looks like "server1:12345, server2:12345"| {div} |
Headers
The following headers are set on exchanges when consuming messages.
...
To receive messages from a queue that is bound to an exchange A with the routing key B,
Code Block |
---|
from("rabbitmq://localhost/A?routingKey=B")
|
To receive messages from a queue with a single thread with auto acknowledge disabled.
Code Block |
---|
from("rabbitmq://localhost/A?routingKey=B&threadPoolSize=1&autoAck=false")
|
To send messages to an exchange called C
Code Block |
---|
...to("rabbitmq://localhost/B")
|
Include Page | ||||
---|---|---|---|---|
|