camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stephen samuel (Confluence)" <conflue...@apache.org>
Subject [CONF] Apache Camel > RabbitMQ
Date Sat, 20 Jul 2013 22:46:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/en/2176/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAMEL/RabbitMQ">RabbitMQ</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~samspade79@gmail.com">stephen
samuel</a>
    </h4>
        <br/>
                         <h4>Changes (6)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{div:class=confluenceTableSmall} <br>||
Property || Default || Description || <br></td></tr>
            <tr><td class="diff-changed-lines" >| {{autoAck}} | {{true}} | <span
class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">
</span> <span class="diff-added-words"style="background-color: #dfd;">If messages
should be auto acknowledged</span> | <br></td></tr>
            <tr><td class="diff-changed-lines" >| {{queue}} | {{random uuid}}
| <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">
</span> <span class="diff-added-words"style="background-color: #dfd;">The queue
to receive messages from</span> | <br></td></tr>
            <tr><td class="diff-changed-lines" >| {{routingKey}} | {{null}} |
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">
</span> <span class="diff-added-words"style="background-color: #dfd;">The routing
key to use when producing messages</span> | <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">|
{{threadPoolSize}} | {{10}} |  | <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">|
{{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. | <br></td></tr>
            <tr><td class="diff-unchanged" >| {{username}} | {{null}} | username
in case of authenticated access | <br>| {{password}} | {{null}} | password for authenticated
access | <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">|
{{vhost}} | {{/}} | the vhost for the channel | <br></td></tr>
            <tr><td class="diff-unchanged" >{div} <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="RabbitMQ-RabbitMQComponent"></a>RabbitMQ Component</h2>

<p><b>Available as of Camel 2.12</b></p>

<p>The <b>rabbitmq:</b> component allows you produce and consume messages
from <a href="http://www.rabbitmq.com/" class="external-link" rel="nofollow">RabbitMQ</a>
instances. Using the RabbitMQ AMQP client, this component offers a pure RabbitMQ approach
over the generic <b>amqp:</b> component.</p>

<p>Maven users will need to add the following dependency to their <tt>pom.xml</tt>
for this component:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: xml; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
&lt;dependency&gt;
    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
    &lt;artifactId&gt;camel-rabbitmq&lt;/artifactId&gt;
    &lt;version&gt;x.x.x&lt;/version&gt;
    &lt;!-- use the same version as your Camel core version --&gt;
&lt;/dependency&gt;
</pre>
</div></div>

<h3><a name="RabbitMQ-URIformat"></a>URI format</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
rabbitmq:http://hostname[:port]/exchangeName?[options...]://name[?options]
</pre>
</div></div>

<p>Where <b>hostname</b> is the hostname of the running rabbitmq instance
or cluster. Port is optional and if not specified then defaults to the RabbitMQ client default
(5672). The exchange name is only needed for producers. For </p>

<h3><a name="RabbitMQ-Options"></a>Options</h3>
<div class="confluenceTableSmall"><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Property </th>
<th class='confluenceTh'> Default </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>autoAck</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
<td class='confluenceTd'> If messages should be auto acknowledged </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>queue</tt> </td>
<td class='confluenceTd'> <tt>random uuid</tt> </td>
<td class='confluenceTd'> The queue to receive messages from </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>routingKey</tt> </td>
<td class='confluenceTd'> <tt>null</tt> </td>
<td class='confluenceTd'> The routing key to use when producing messages </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>threadPoolSize</tt> </td>
<td class='confluenceTd'> <tt>10</tt> </td>
<td class='confluenceTd'> The consumer uses a Thread Pool Executor with a fixed number
of threads. This setting allows you to set that number of threads. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>username</tt> </td>
<td class='confluenceTd'> <tt>null</tt> </td>
<td class='confluenceTd'> username in case of authenticated access </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>password</tt> </td>
<td class='confluenceTd'> <tt>null</tt> </td>
<td class='confluenceTd'> password for authenticated access </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>vhost</tt> </td>
<td class='confluenceTd'> <tt>/</tt> </td>
<td class='confluenceTd'> the vhost for the channel </td>
</tr>
</tbody></table>
</div>
</div>

<h3><a name="RabbitMQ-Headers"></a>Headers</h3>

<p>The following headers are set on exchanges when consuming messages.</p>
<div class="confluenceTableSmall"><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Property </th>
<th class='confluenceTh'> Value </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.ROUTING_KEY</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.EXCHANGE_NAME</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.DELIVERY_TAG</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
</tbody></table>
</div>
</div>

<p>The following headers are used by the producer. If these are set on the camel exchange
then they will be set on the RabbitMQ message.</p>
<div class="confluenceTableSmall"><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Property </th>
<th class='confluenceTh'> Value </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.ROUTING_KEY</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.EXCHANGE_NAME</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.CONTENT_TYPE</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.PRIORITY</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.CORRELATIONID</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.MESSAGE_ID</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.DELIVERY_MODE</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.USERID</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.CLUSTERID</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.REPLY_TO</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.CONTENT_ENCODING</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.TYPE</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.EXPIRATION</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.TIMESTAMP</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>rabbitmq.APP_ID</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
</tbody></table>
</div>
</div>

<p>Headers are set by the consumer once the message is received. The producer will also
set the headers for downstream processors once the exchange has taken place. Any headers set
prior to production that the producer sets will be overriden.</p>

<h3><a name="RabbitMQ-MessageBody"></a>Message Body</h3>

<p>The component will use the camel exchange in body as the rabbit mq message body.
The camel exchange in object must be convertible to a byte array. Otherwise the producer will
throw an exception of unsupported body type.</p>

<h3><a name="RabbitMQ-Samples"></a>Samples</h3>

<p>... to be completed</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=CAMEL">Stop
watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://cwiki.apache.org/confluence/users/editmyemailsettings.action">Change
email notification preferences</a>
</div>
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/RabbitMQ">View Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=33294950&revisedVersion=7&originalVersion=6">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/RabbitMQ?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message