camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r964619 [2/2] - in /websites/production/camel/content: cache/main.pageCache camel-2160-release.html sjms.html
Date Mon, 07 Sep 2015 09:19:06 GMT
Modified: websites/production/camel/content/sjms.html
==============================================================================
--- websites/production/camel/content/sjms.html (original)
+++ websites/production/camel/content/sjms.html Mon Sep  7 09:19:05 2015
@@ -86,61 +86,61 @@
         <tr>
         <td valign="top" width="100%">
 <div class="wiki-content maincontent"><h2 id="SJMS-SJMSComponent">SJMS Component</h2><p><strong>Available as of Camel 2.11</strong></p><p>The Simple JMS Component, or SJMS, is a JMS client for use with Camel that uses well known best practices when it comes to JMS client creation and configuration. SJMS contains a brand new JMS client API written explicitly for Camel eliminating third party messaging implementations keeping it light and resilient. The following features is included:</p><ul><li>Standard Queue and Topic Support (Durable &amp; Non-Durable)</li><li>InOnly &amp; InOut MEP Support</li><li>Asynchronous Producer and Consumer Processing</li><li>Internal JMS Transaction Support</li></ul><p>Additional key features include:</p><ul><li>Plugable Connection Resource Management</li><li>Session, Consumer, &amp; Producer Pooling &amp; Caching Management</li><li>Batch Consumers and Producers</li><li>Transacted Batch Consumers &amp; Producers</li><li>Support for Customizable Transactio
 n Commit Strategies (Local JMS Transactions only)</li></ul><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Why the S in SJMS</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>S stands for Simple and Standard and Springless. Also camel-jms was already taken. <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/smile.png" data-emoticon-name="smile" alt="(smile)"></p></div></div><p>&#160;</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;dependency&gt;
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-sjms&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>
+]]></script>
 </div></div><h4 id="SJMS-URIformat">URI format</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">sjms:[queue:|topic:]destinationName[?options]
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[sjms:[queue:|topic:]destinationName[?options]
+]]></script>
 </div></div><p>Where <code>destinationName</code> is a JMS queue or topic name. By default, the <code>destinationName</code> is interpreted as a queue name. For example, to connect to the queue, <code>FOO.BAR</code> use:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">sjms:FOO.BAR
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[sjms:FOO.BAR
+]]></script>
 </div></div><p>You can include the optional <code>queue:</code> prefix, if you prefer:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">sjms:queue:FOO.BAR
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[sjms:queue:FOO.BAR
+]]></script>
 </div></div><p>To connect to a topic, you <em>must</em> include the <code>topic:</code> prefix. For example, to connect to the topic, <code>Stocks.Prices</code>, use:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">sjms:topic:Stocks.Prices
-</pre>
-</div></div><p>You append query options to the URI using the following format, <code>?option=value&amp;option=value&amp;...</code></p><h3 id="SJMS-ComponentOptionsandConfigurations">Component Options and Configurations</h3><p>The SJMS Component supports the following configuration options:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Required</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectionCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum number of connect
 ions available to endpoints started under this component</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectionFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/ConnectionFactory.html" rel="nofollow">ConnectionFactory</a> is required to enable the SjmsComponent. It can be set directly or set set as part of a ConnectionResource.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectionResource</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p><
 /td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A ConnectionResource is an interface that allows for customization and container control of the ConnectionFactory. See <a shape="rect" href="sjms.html">Plugable Connection Resource Management</a> for further details.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headerFilterStrategy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>DefaultJmsKeyFormatStrategy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyFormatStrategy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>DefaultJmsKeyFormatStrategy</code></p></td><td colspan="1" rowspan="1" clas
 s="confluenceTd"><p>&#160;</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>transactionCommitStrategy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>DestinationCreationStrategy</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><code>DefaultDestinationCreationStrategy</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Since Camel 2.15.0</strong>: Support to set the custom DestinationCreationStrategy on the SJMS Component.</td></tr></tbody></table></div></div><p>Below is an example of how to configure the SjmsComponent with its required ConnectionFactory provider. It will create a single connection by default and store it using the co
 mponents internal pooling APIs to ensure that it is able to service Session creation requests in a thread safe manner.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">SjmsComponent component = new SjmsComponent();
-component.setConnectionFactory(new ActiveMQConnectionFactory("tcp://localhost:61616"));
-getContext().addComponent("sjms", component);
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[sjms:topic:Stocks.Prices
+]]></script>
+</div></div><p>You append query options to the URI using the following format, <code>?option=value&amp;option=value&amp;...</code></p><h3 id="SJMS-ComponentOptionsandConfigurations">Component Options and Configurations</h3><p>The SJMS Component supports the following configuration options:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Required</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectionCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum number of connect
 ions available to endpoints started under this component</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectionFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/ConnectionFactory.html" rel="nofollow">ConnectionFactory</a> is required to enable the SjmsComponent. It can be set directly or set set as part of a ConnectionResource.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectionResource</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p><
 /td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A ConnectionResource is an interface that allows for customization and container control of the ConnectionFactory. See <a shape="rect" href="#SJMS-connectionresource">Plugable Connection Resource Management</a> for further details.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headerFilterStrategy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>DefaultJmsKeyFormatStrategy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyFormatStrategy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>DefaultJmsKeyFormatStrategy</code></p></td><td colspan="1" r
 owspan="1" class="confluenceTd"><p><strong>Camel 2.15.x or older</strong>: See option below</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>jmsKeyFormatStrategy</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><code>DefaultJmsKeyFormatStrategy</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> <span style="color: rgb(0,0,0);">Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification. Camel provides two implementations out of the box:&#160;</span><code>default</code><span style="color: rgb(0,0,0);">&#160;and&#160;</span><code>passthrough</code><span style="color: rgb(0,0,0);">. The&#160;</span><code>default</code><span style="color: rgb(0,0,0);">&#160;strategy will safely marshal dots and hyphens (</span><code>.</code><span style="color: rgb(0,0,0);">&#160;and&#160;</span><code>-</code><span style="color: 
 rgb(0,0,0);">). The&#160;</span><code>passthrough</code><span style="color: rgb(0,0,0);">&#160;strategy leaves the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain illegal characters. You can provide your own implementation of the</span><code>org.apache.camel.component.jms.JmsKeyFormatStrategy</code><span style="color: rgb(0,0,0);">&#160;and refer to it using the&#160;</span><code>#</code><span style="color: rgb(0,0,0);">&#160;notation.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>transactionCommitStrategy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>DestinationCreationStrategy</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspa
 n="1" class="confluenceTd"><code>DefaultDestinationCreationStrategy</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15.0</strong>: Support to set the custom DestinationCreationStrategy on the SJMS Component.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>messageCreatedStrategy</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> <span style="line-height: 1.42857;">To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of javax.jms.Message objects when Camel is sending a JMS message.</span></td></tr></tbody></table></div></div><p>Below is an example of how to configure the SjmsComponent with its required ConnectionFactory provider. It will create a single connection by default and store it using the components internal pooling APIs to ensure that 
 it is able to service Session creation requests in a thread safe manner.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[SjmsComponent component = new SjmsComponent();
+component.setConnectionFactory(new ActiveMQConnectionFactory(&quot;tcp://localhost:61616&quot;));
+getContext().addComponent(&quot;sjms&quot;, component);
+]]></script>
 </div></div><p>For a SjmsComponent that is required to support a durable subscription, you can override the default ConnectionFactoryResource instance and set the <strong>clientId</strong> property.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">ConnectionFactoryResource connectionResource = new ConnectionFactoryResource();
-connectionResource.setConnectionFactory(new ActiveMQConnectionFactory("tcp://localhost:61616"));
-connectionResource.setClientId("myclient-id");
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ConnectionFactoryResource connectionResource = new ConnectionFactoryResource();
+connectionResource.setConnectionFactory(new ActiveMQConnectionFactory(&quot;tcp://localhost:61616&quot;));
+connectionResource.setClientId(&quot;myclient-id&quot;);
 
 SjmsComponent component = new SjmsComponent();
 component.setConnectionResource(connectionResource);
 component.setMaxConnections(1);
-</pre>
-</div></div><h3 id="SJMS-ProducerConfigurationOptions">Producer Configuration Options</h3><p>The SjmsProducer Endpoint supports the following properties:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>acknowledgementMode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>AUTO_ACKNOWLEDGE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The JMS acknowledgement name, which is one of: <code>SESSION_TRANSACTED</code>, <code>AUTO_ACKNOWLEDGE</code> or <code>DUPS_OK_ACKNOWLEDGE</code>. <code>CLIENT_ACKNOWLEDGE</code> is not supported at this time.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><cod
 e>consumerCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>InOut only.</strong> Defines the number of <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/MessageListener.html" rel="nofollow">MessageListener</a> instances that for response consumers.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchangePattern</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>InOnly</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets the Producers message exchange pattern.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>namedReplyTo</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>InOut only.</strong> Specifies a named reply to destination for responses.</p>
 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>persistent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether a message should be delivered with persistence enabled.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Defines the number of <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/MessageProducer.html" rel="nofollow">MessageProducer</a> instances.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>responseTimeOut</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>5000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>InOut only.</strong> Specifies the amount of time 
 an InOut Producer will wait for its response.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>synchronous</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets whether the Endpoint will use synchronous or asynchronous processing.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>transacted</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the endpoint should use a JMS Session transaction.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ttl</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Disabled by default. Sets the Message time to live header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><pre>prefil
 lPool</pre></td><td colspan="1" rowspan="1" class="confluenceTd"><span>true</span></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.14:</strong> Whether to prefill the producer connection pool on startup, or create connections lazy when needed.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">allowNullBody</td><td colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15.1:</strong> <span style="color: rgb(0,0,0);">Whether to allow sending messages with no body. If this option is&#160;</span><code>false</code><span style="color: rgb(0,0,0);">&#160;and the message body is null, then an&#160;</span><code>JMSException</code><span style="color: rgb(0,0,0);">&#160;is thrown.</span></td></tr></tbody></table></div></div><h3 id="SJMS-ProducerUsage">Producer Usage</h3><h4 id="SJMS-InOnlyProducer-(Default)">InOnly Producer - (Default)</h4><p>The InOnly Producer is the default behavior of the SJMS 
 Producer Endpoint.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">from("direct:start")
-    .to("sjms:queue:bar");
-</pre>
+]]></script>
+</div></div><h3 id="SJMS-ProducerConfigurationOptions">Producer Configuration Options</h3><p>The SjmsProducer Endpoint supports the following properties:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>acknowledgementMode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>AUTO_ACKNOWLEDGE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The JMS acknowledgement name, which is one of: <code>SESSION_TRANSACTED</code>, <code>AUTO_ACKNOWLEDGE</code> or <code>DUPS_OK_ACKNOWLEDGE</code>. <code>CLIENT_ACKNOWLEDGE</code> is not supported at this time.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><cod
 e>consumerCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>InOut only.</strong> Defines the number of <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/MessageListener.html" rel="nofollow">MessageListener</a> instances that for response consumers.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchangePattern</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>InOnly</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets the Producers message exchange pattern.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>namedReplyTo</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>InOut only.</strong> Specifies a named reply to destination for responses.</p>
 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>persistent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether a message should be delivered with persistence enabled.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Defines the number of <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/MessageProducer.html" rel="nofollow">MessageProducer</a> instances.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>responseTimeOut</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>5000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>InOut only.</strong> Specifies the amount of time 
 an InOut Producer will wait for its response.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>synchronous</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets whether the Endpoint will use synchronous or asynchronous processing.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>transacted</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the endpoint should use a JMS Session transaction.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ttl</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Disabled by default. Sets the Message time to live header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><pre>prefil
 lPool</pre></td><td colspan="1" rowspan="1" class="confluenceTd"><span>true</span></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.14:</strong> Whether to prefill the producer connection pool on startup, or create connections lazy when needed.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">allowNullBody</td><td colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15.1:</strong> <span style="color: rgb(0,0,0);">Whether to allow sending messages with no body. If this option is&#160;</span><code>false</code><span style="color: rgb(0,0,0);">&#160;and the message body is null, then an&#160;</span><code>JMSException</code><span style="color: rgb(0,0,0);">&#160;is thrown.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>mapJmsMessage</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>true</code></td><td colspan="1" rowspan="1" class="confluenceTd"><
 strong>Camel 2.16:</strong> <span style="color: rgb(0,0,0);">Specifies whether Camel should auto map the received JMS message to an appropiate payload type, such as&#160;</span><code>javax.jms.TextMessage</code><span style="color: rgb(0,0,0);">&#160;to a&#160;</span><code>String</code><span style="color: rgb(0,0,0);">&#160;etc.&#160;</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>messageCreatedStrategy</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong><span>&#160;</span><span>To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of javax.jms.Message objects when Camel is sending a JMS message.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>jmsKeyFormatStrategy</span></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.1
 6:</strong><span>&#160;</span><span style="color: rgb(0,0,0);">Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification. Camel provides two implementations out of the box:&#160;</span><code>default</code><span style="color: rgb(0,0,0);">&#160;and&#160;</span><code>passthrough</code><span style="color: rgb(0,0,0);">. The&#160;</span><code>default</code><span style="color: rgb(0,0,0);">&#160;strategy will safely marshal dots and hyphens (</span><code>.</code><span style="color: rgb(0,0,0);">&#160;and&#160;</span><code>-</code><span style="color: rgb(0,0,0);">). The&#160;</span><code>passthrough</code><span style="color: rgb(0,0,0);">&#160;strategy leaves the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain illegal characters. You can provide your own implementation of the</span><code>org.apache.camel.component.jms.JmsKeyFormatStrategy</code><span style="color: rgb(0,0,0);">&#160;and refer to it us
 ing the&#160;</span><code>#</code><span style="color: rgb(0,0,0);">&#160;notation.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">includeAllJMSXProperties</span></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> <span style="color: rgb(0,0,0);">Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this to&#160;</span><code>true</code><span style="color: rgb(0,0,0);">&#160;will include properties such as&#160;</span><code>JMSXAppID</code><span style="color: rgb(0,0,0);">, and&#160;</span><code>JMSXUserID</code><span style="color: rgb(0,0,0);">&#160;etc.&#160;</span><strong>Note:</strong><span style="color: rgb(0,0,0);">&#160;If you are using a custom&#160;</span><code>headerFilterStrategy</code><span style="color: rgb(0,0,0);">&#160;then this option does not apply.</span></td></tr></tbody></table></div><
 /div><h3 id="SJMS-ProducerUsage">Producer Usage</h3><h4 id="SJMS-InOnlyProducer-(Default)">InOnly Producer - (Default)</h4><p>The InOnly Producer is the default behavior of the SJMS Producer Endpoint.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
+    .to(&quot;sjms:queue:bar&quot;);
+]]></script>
 </div></div><h4 id="SJMS-InOutProducer">InOut Producer</h4><p>To enable InOut behavior append the <code>exchangePattern</code> attribute to the URI. By default it will use a dedicated TemporaryQueue for each consumer.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">from("direct:start")
-    .to("sjms:queue:bar?exchangePattern=InOut");
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
+    .to(&quot;sjms:queue:bar?exchangePattern=InOut&quot;);
+]]></script>
 </div></div><p>You can specify a <code>namedReplyTo</code> though which can provide a better monitor point.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">from("direct:start")
-    .to("sjms:queue:bar?exchangePattern=InOut&amp;namedReplyTo=my.reply.to.queue");
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
+    .to(&quot;sjms:queue:bar?exchangePattern=InOut&amp;namedReplyTo=my.reply.to.queue&quot;);
+]]></script>
 </div></div><h3 id="SJMS-ConsumersConfigurationOptions">Consumers Configuration Options</h3><p>The SjmsConsumer Endpoint supports the following properties:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>acknowledgementMode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>AUTO_ACKNOWLEDGE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The JMS acknowledgement name, which is one of: <code>TRANSACTED</code>, <code>AUTO_ACKNOWLEDGE</code> or <code>DUPS_OK_ACKNOWLEDGE</code>. <code>CLIENT_ACKNOWLEDGE</code> is not supported at this time.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cons
 umerCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Defines the number of <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/MessageListener.html" rel="nofollow">MessageListener</a> instances.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>durableSubscriptionId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Required for a durable subscriptions.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchangePattern</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>InOnly</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets the Consumers message exchange pattern.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>messageSelector</code></p><
 /td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets the message selector.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>synchronous</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets whether the Endpoint will use synchronous or asynchronous processing.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>transacted</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the endpoint should use a JMS Session transaction.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>transactionBatchCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The 
 number of exchanges to process before committing a local JMS transaction. The <code>transacted</code> property must also be set to true or this property will be ignored.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>transactionBatchTimeout</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>5000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The amount of time a the transaction will stay open between messages before committing what has already been consumed. Minimum value is 1000ms.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ttl</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Disabled by default. Sets the Message time to live header.</p></td></tr></tbody></table></div></div><h3 id="SJMS-ConsumerUsage">Consumer Usage</h3><h4 id="SJMS-InOnlyConsumer-(Default)">InOnly Consumer - (Default)</h4
 ><p>The InOnly Consumer is the default Exchange behavior of the SJMS Consumer Endpoint.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">from("sjms:queue:bar")
-    .to("mock:result");
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;sjms:queue:bar&quot;)
+    .to(&quot;mock:result&quot;);
+]]></script>
 </div></div><h4 id="SJMS-InOutConsumer">InOut Consumer</h4><p>To enable InOut behavior append the <code>exchangePattern</code> attribute to the URI.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">from("sjms:queue:in.out.test?exchangePattern=InOut")
-    .transform(constant("Bye Camel"));
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;sjms:queue:in.out.test?exchangePattern=InOut&quot;)
+    .transform(constant(&quot;Bye Camel&quot;));
+]]></script>
 </div></div><h3 id="SJMS-AdvancedUsageNotes">Advanced Usage Notes</h3><h4 id="SJMS-PlugableConnectionResourceManagementconnectionresource">Plugable Connection Resource Management <span class="confluence-anchor-link" id="SJMS-connectionresource"></span></h4><p>SJMS provides JMS <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/Connection.html" rel="nofollow">Connection</a> resource management through built-in connection pooling. This eliminates the need to depend on third party API pooling logic. However there may be times that you are required to use an external Connection resource manager such as those provided by J2EE or OSGi containers. For this SJMS provides an interface that can be used to override the internal SJMS Connection pooling capabilities. This is accomplished through the <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms
 /ConnectionResource.java">ConnectionResource</a> interface.</p><p>The <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/ConnectionResource.java">ConnectionResource</a> provides methods for borrowing and returning Connections as needed is the contract used to provide <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/Connection.html" rel="nofollow">Connection</a> pools to the SJMS component. A user should use when it is necessary to integrate SJMS with an external connection pooling manager.</p><p>It is recommended though that for standard <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/ConnectionFactory.html" rel="nofollow">ConnectionFactory</a> providers you use the <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-sjms/src/test/java/org/
 apache/camel/component/sjms/it/ConnectionResourceIT.java">ConnectionFactoryResource</a> implementation that is provided with SJMS as-is or extend as it is optimized for this component.</p><p>Below is an example of using the pluggable ConnectionResource with the ActiveMQ PooledConnectionFactory:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class AMQConnectionResource implements ConnectionResource {
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class AMQConnectionResource implements ConnectionResource {
     private PooledConnectionFactory pcf;
 
     public AMQConnectionResource(String connectString, int maxConnections) {
@@ -168,63 +168,63 @@ component.setMaxConnections(1);
 
     @Override
     public void returnConnection(Connection connection) throws Exception {
-        // Do nothing since there isn't a way to return a Connection
+        // Do nothing since there isn&#39;t a way to return a Connection
         // to the instance of PooledConnectionFactory
-        log.info("Connection returned");
+        log.info(&quot;Connection returned&quot;);
     }
 }
-</pre>
+]]></script>
 </div></div><p>Then pass in the ConnectionResource to the SjmsComponent:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">CamelContext camelContext = new DefaultCamelContext();
-AMQConnectionResource pool = new AMQConnectionResource("tcp://localhost:33333", 1);
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[CamelContext camelContext = new DefaultCamelContext();
+AMQConnectionResource pool = new AMQConnectionResource(&quot;tcp://localhost:33333&quot;, 1);
 SjmsComponent component = new SjmsComponent();
 component.setConnectionResource(pool);
-camelContext.addComponent("sjms", component);
-</pre>
+camelContext.addComponent(&quot;sjms&quot;, component);
+]]></script>
 </div></div><p>To see the full example of its usage please refer to the <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/it/ConnectionResourceIT.java">ConnectionResourceIT</a>.</p><h4 id="SJMS-Session,Consumer,&amp;ProducerPooling&amp;CachingManagement">Session, Consumer, &amp; Producer Pooling &amp; Caching Management</h4><p>Coming soon ...</p><h4 id="SJMS-BatchMessageSupport">Batch Message Support</h4><p>The SjmsProducer supports publishing a collection of messages by creating an Exchange that encapsulates a List. This SjmsProducer will take then iterate through the contents of the List and publish each message individually.</p><p>If when producing a batch of messages there is the need to set headers that are unique to each message you can use the SJMS <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-sjms/src/main/java
 /org/apache/camel/component/sjms/BatchMessage.java">BatchMessage</a> class. When the SjmsProducer encounters a BatchMessage List it will iterate each BatchMessage and publish the included payload and headers.</p><p>Below is an example of using the BatchMessage class. First we create a List of BatchMessages:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">List&lt;BatchMessage&lt;String&gt;&gt; messages = new ArrayList&lt;BatchMessage&lt;String&gt;&gt;();
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[List&lt;BatchMessage&lt;String&gt;&gt; messages = new ArrayList&lt;BatchMessage&lt;String&gt;&gt;();
 for (int i = 1; i &lt;= messageCount; i++) {
-    String body = "Hello World " + i;
+    String body = &quot;Hello World &quot; + i;
     BatchMessage&lt;String&gt; message = new BatchMessage&lt;String&gt;(body, null);
     messages.add(message);
 }
-</pre>
+]]></script>
 </div></div><p>Then publish the List:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">template.sendBody("sjms:queue:batch.queue", messages);
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[template.sendBody(&quot;sjms:queue:batch.queue&quot;, messages);
+]]></script>
 </div></div><h4 id="SJMS-CustomizableTransactionCommitStrategies(LocalJMSTransactionsonly)">Customizable Transaction Commit Strategies (Local JMS Transactions only)</h4><p>SJMS provides a developer the means to create a custom and plugable transaction strategy through the use of the <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/TransactionCommitStrategy.java">TransactionCommitStrategy</a> interface. This allows a user to define a unique set of circumstances that the <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/tx/SessionTransactionSynchronization.java">SessionTransactionSynchronization</a> will use to determine when to commit the Session. An example of its use is the <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/component
 s/camel-sjms/src/main/java/org/apache/camel/component/sjms/tx/BatchTransactionCommitStrategy.java">BatchTransactionCommitStrategy</a> which is detailed further in the next section.</p><h4 id="SJMS-TransactedBatchConsumers&amp;Producers">Transacted Batch Consumers &amp; Producers</h4><p>The SjmsComponent has been designed to support the batching of local JMS transactions on both the Producer and Consumer endpoints. How they are handled on each is very different though.</p><p>The SjmsConsumer endpoint is a straitforward implementation that will process X messages before committing them with the associated Session. To enable batched transaction on the consumer first enable transactions by setting the <code>transacted</code> parameter to true and then adding the <code>transactionBatchCount</code> and setting it to any value that is greater than 0. For example the following configuration will commit the Session every 10 messages:</p><div class="code panel pdl" style="border-width: 1px;">
 <div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">sjms:queue:transacted.batch.consumer?transacted=true&amp;transactionBatchCount=10
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[sjms:queue:transacted.batch.consumer?transacted=true&amp;transactionBatchCount=10
+]]></script>
 </div></div><p>If an exception occurs during the processing of a batch on the consumer endpoint, the Session rollback is invoked causing the messages to be redelivered to the next available consumer. The counter is also reset to 0 for the BatchTransactionCommitStrategy for the associated Session as well. It is the responsibility of the user to ensure they put hooks in their processors of batch messages to watch for messages with the JMSRedelivered header set to true. This is the indicator that messages were rolled back at some point and that a verification of a successful processing should occur.</p><p>A transacted batch consumer also carries with it an instance of an internal timer that waits a default amount of time (5000ms) between messages before committing the open transactions on the Session. The default value of 5000ms (minimum of 1000ms) should be adequate for most use-cases but if further tuning is necessary simply set the <code>transactionBatchTimeout</code> parameter.</p>
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">sjms:queue:transacted.batch.consumer?transacted=true&amp;transactionBatchCount=10&amp;transactionBatchTimeout=2000
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[sjms:queue:transacted.batch.consumer?transacted=true&amp;transactionBatchCount=10&amp;transactionBatchTimeout=2000
+]]></script>
 </div></div><p>The minimal value that will be accepted is 1000ms as the amount of context switching may cause unnecessary performance impacts without gaining benefit.</p><p>The producer endpoint is handled much differently though. With the producer after each message is delivered to its destination the Exchange is closed and there is no longer a reference to that message. To make a available all the messages available for redelivery you simply enable transactions on a Producer Endpoint that is publishing BatchMessages. The transaction will commit at the conclusion of the exchange which includes all messages in the batch list. Nothing additional need be configured. For example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">List&lt;BatchMessage&lt;String&gt;&gt; messages = new ArrayList&lt;BatchMessage&lt;String&gt;&gt;();
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[List&lt;BatchMessage&lt;String&gt;&gt; messages = new ArrayList&lt;BatchMessage&lt;String&gt;&gt;();
 for (int i = 1; i &lt;= messageCount; i++) {
-    String body = "Hello World " + i;
+    String body = &quot;Hello World &quot; + i;
     BatchMessage&lt;String&gt; message = new BatchMessage&lt;String&gt;(body, null);
     messages.add(message);
 }
-</pre>
+]]></script>
 </div></div><p>Now publish the List with transactions enabled:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">template.sendBody("sjms:queue:batch.queue?transacted=true", messages);
-</pre>
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[template.sendBody(&quot;sjms:queue:batch.queue?transacted=true&quot;, messages);
+]]></script>
 </div></div><h3 id="SJMS-AdditionalNotes">Additional Notes</h3><h4 id="SJMS-MessageHeaderFormat">Message Header Format</h4><p>The SJMS Component uses the same header format strategy that is used in the Camel JMS Component. This plugable strategy ensures that messages sent over the wire conform to the JMS Message spec.</p><p>For the exchange.in.header the following rules apply for the header keys:</p><p>Keys starting with JMS or JMSX are reserved.<br clear="none"> exchange.in.headers keys must be literals and all be valid Java identifiers (do not use dots in the key name).<br clear="none"> Camel replaces dots &amp; hyphens and the reverse when when consuming JMS messages:</p><ul><li>is replaced by <em>DOT</em> and the reverse replacement when Camel consumes the message.</li><li>is replaced by <em>HYPHEN</em> and the reverse replacement when Camel consumes the message.<br clear="none"> See also the option jmsKeyFormatStrategy, which allows use of your own custom strategy for formattin
 g keys.</li></ul><p>For the exchange.in.header, the following rules apply for the header values:</p><h4 id="SJMS-MessageContent">Message Content</h4><p>To deliver content over the wire we must ensure that the body of the message that is being delivered adheres to the JMS Message Specification. Therefore, all that are produced must either be primitives or their counter objects (such as Integer, Long, Character). The types, String, CharSequence, Date, BigDecimal and BigInteger are all converted to their toString() representation. All other types are dropped.</p><h4 id="SJMS-Clustering">Clustering</h4><p>When using InOut with SJMS in a clustered environment you must either use TemporaryQueue destinations or use a unique named reply to destination per InOut producer endpoint. Message correlation is handled by the endpoint, not with message selectors at the broker. The InOut Producer Endpoint uses Java Concurrency Exchangers cached by the Message JMSCorrelationID. This provides a nice pe
 rformance increase while reducing the overhead on the broker since all the messages are consumed from the destination in the order they are produced by the interested consumer.</p><p>Currently the only correlation strategy is to use the JMSCorrelationId. The InOut Consumer uses this strategy as well ensuring that all responses messages to the included JMSReplyTo destination also have the JMSCorrelationId copied from the request as well.</p><h3 id="SJMS-TransactionSupporttransactions">Transaction Support <span class="confluence-anchor-link" id="SJMS-transactions"></span></h3><p>SJMS currently only supports the use of internal JMS Transactions. There is no support for the Camel Transaction Processor or the Java Transaction API (JTA).</p><h4 id="SJMS-DoesSpringlessMeanICan'tUseSpring?">Does Springless Mean I Can't Use Spring?</h4><p>Not at all. Below is an example of the SJMS component using the Spring DSL:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeConte
 nt panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;route
-    id="inout.named.reply.to.producer.route"&gt;
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;route
+    id=&quot;inout.named.reply.to.producer.route&quot;&gt;
     &lt;from
-        uri="direct:invoke.named.reply.to.queue" /&gt;
+        uri=&quot;direct:invoke.named.reply.to.queue&quot; /&gt;
     &lt;to
-        uri="sjms:queue:named.reply.to.queue?namedReplyTo=my.response.queue&amp;amp;exchangePattern=InOut" /&gt;
+        uri=&quot;sjms:queue:named.reply.to.queue?namedReplyTo=my.response.queue&amp;amp;exchangePattern=InOut&quot; /&gt;
 &lt;/route&gt;
-</pre>
+]]></script>
 </div></div><p>Springless refers to moving away from the dependency on the Spring JMS API. A new JMS client API is being developed from the ground up to power SJMS.</p></div>
         </td>
         <td valign="top">
           <div class="navigation">
             <div class="navigation_top">
                 <!-- NavigationBar -->
-<div class="navigation_bottom" id="navigation_bottom"><h3 id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49132"><a shape="rect" href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a shape="rect" href="download.html">Download</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li><li><a shape="rect" href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentationhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49534"><a shape="rect" href="documentation.html">Documentation</a></h3><ul class="alternate"><li><a shape="rect" href="user-guide.html">User Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a shape="rect" href="books.html">Books</a></li><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="cookbook.html">Cookbook</a></li>
 <li><a shape="rect" href="architecture.html">Architecture</a></li><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a shape="rect" href="components.html">Components</a></li><li><a shape="rect" href="data-format.html">Data Format</a></li><li><a shape="rect" href="languages.html">Languages</a></li><li><a shape="rect" href="security.html">Security</a></li><li><a shape="rect" href="security-advisories.html">Security Advisories</a></li></ul><h3 id="Navigation-Search">Search</h3><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
+<div class="navigation_bottom" id="navigation_bottom"><h3 id="Navigation-Overview"><a shape="rect" href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a shape="rect" href="download.html">Download</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li><li><a shape="rect" href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a shape="rect" href="documentation.html">Documentation</a></h3><ul class="alternate"><li><a shape="rect" href="user-guide.html">User Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a shape="rect" href="books.html">Books</a></li><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="cookbook.html">Cookbook</a></li><li><a shape="rect" href="architecture.html">Architecture</a></li><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise
  Integration Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a shape="rect" href="components.html">Components</a></li><li><a shape="rect" href="data-format.html">Data Format</a></li><li><a shape="rect" href="languages.html">Languages</a></li><li><a shape="rect" href="security.html">Security</a></li><li><a shape="rect" href="security-advisories.html">Security Advisories</a></li></ul><h3 id="Navigation-Search">Search</h3><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
   <div>
     <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
     <input type="hidden" name="ie" value="UTF-8">
@@ -232,7 +232,7 @@ for (int i = 1; i &lt;= messageCount; i+
     <input type="submit" name="sa" value="Search">
   </div>
 </form>
-<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script><h3 id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49115"><a shape="rect" href="community.html">Community</a></h3><ul class="alternate"><li><a shape="rect" href="support.html">Support</a></li><li><a shape="rect" href="contributing.html">Contributing</a></li><li><a shape="rect" href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect" href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect" href="user-stories.html">User Stories</a></li><li><a shape="rect" href="news.html">News</a></li><li><a shape="rect" href="articles.html">Articles</a></li><li><a shape="rect" href="site.html">Site</a></li><li><a shape="rect" href="team.html">Team</a></li><li><a shape="rect" class="external-link" href="http://camel-extra.googlecode.com/" rel="nofollow">Camel Extra</a></li></ul><h3 id="Navigation-Developershttps://cwi
 ki.apache.org/confluence/pages/viewpage.action?pageId=49124"><a shape="rect" href="developers.html">Developers</a></h3><ul class="alternate"><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect" href="source.html">Source</a></li><li><a shape="rect" href="building.html">Building</a></li><li><a shape="rect" href="javadoc.html">JavaDoc</a></li><li><a shape="rect" href="irc-room.html">IRC Room</a></li></ul><h3 id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul class="alternate"><li><a shape="rect" class="external-link" href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/security/">Security</a></li></ul></div>
+<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script><h3 id="Navigation-Community"><a shape="rect" href="community.html">Community</a></h3><ul class="alternate"><li><a shape="rect" href="support.html">Support</a></li><li><a shape="rect" href="contributing.html">Contributing</a></li><li><a shape="rect" href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect" href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect" href="user-stories.html">User Stories</a></li><li><a shape="rect" href="news.html">News</a></li><li><a shape="rect" href="articles.html">Articles</a></li><li><a shape="rect" href="site.html">Site</a></li><li><a shape="rect" href="team.html">Team</a></li><li><a shape="rect" class="external-link" href="http://camel-extra.googlecode.com/" rel="nofollow">Camel Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect" href="developers.html">Developers</a></h3><ul class="alternate"
 ><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect" href="source.html">Source</a></li><li><a shape="rect" href="building.html">Building</a></li><li><a shape="rect" href="javadoc.html">JavaDoc</a></li><li><a shape="rect" href="irc-room.html">IRC Room</a></li></ul><h3 id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul class="alternate"><li><a shape="rect" class="external-link" href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/security/">Security</a></li></ul></div>
                 <!-- NavigationBar -->
             </div>
           </div>



Mime
View raw message