camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r836639 - in /websites/production/camel/content: cache/main.pageCache sjms.html
Date Tue, 30 Oct 2012 22:17:39 GMT
Author: buildbot
Date: Tue Oct 30 22:17:39 2012
New Revision: 836639

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/sjms.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/sjms.html
==============================================================================
--- websites/production/camel/content/sjms.html (original)
+++ websites/production/camel/content/sjms.html Tue Oct 30 22:17:39 2012
@@ -81,7 +81,7 @@
 
 <div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col
span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1"
valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif"
width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">This
component is under active development.</td></tr></table></div>
 
-<p>The SJMS Component is a JMS client for use with Camel. SJMS uses a JMS client API
written explicitly for Camel and does not depend on any third party messaging implementations
keeping it light and resilient.  It is scheduled to be released as part of Camel 2.11 with
the following functionality:</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.  It is scheduled to be released as part of
Camel 2.11 with the following functionality:</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>
 
@@ -219,7 +219,7 @@ from(<span class="code-quote">"direct:st
 <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"> Option </th><th colspan="1" rowspan="1" class="confluenceTh">
Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description
</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>acknowledgementMode</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>AUTO_ACKNOWLEDGE</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> The JMS acknowledgement
name, which is one of: <tt>TRANSACTED</tt>, <tt>AUTO_ACKNOWLEDGE</tt>
or <tt>DUPS_OK_ACKNOWLEDGE</tt>. <tt>CLIENT_ACKNOWLEDGE</tt> is not
supported at this time. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumerCount</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
Defines the number of <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/MessageListener.htm
 l" rel="nofollow">MessageListener</a> instances. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>durableSubscriptionId</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> Required for a durable
subscriptions. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>exchangePattern</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>InOnly</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
Sets the Consumers message exchange pattern. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>messageSelector</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> Sets the message selector. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>synchronous</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td
colspan="1" rowspan=
 "1" class="confluenceTd"> Sets whether the Endpoint will use synchronous or asynchronous
processing. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>transacted</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
If the endpoint should use a JMS Session transaction. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionBatchCount</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>1</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> The number of exchanges
to process before committing a local JMS transaction.  The <tt>transacted</tt>
property must also be set to true or this property will be ignored. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>ttl</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>-1</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> Disabled by default.  Sets the Message 
 time to live header. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh">
Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description
</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>acknowledgementMode</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>AUTO_ACKNOWLEDGE</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> The JMS acknowledgement
name, which is one of: <tt>TRANSACTED</tt>, <tt>AUTO_ACKNOWLEDGE</tt>
or <tt>DUPS_OK_ACKNOWLEDGE</tt>. <tt>CLIENT_ACKNOWLEDGE</tt> is not
supported at this time. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumerCount</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
Defines the number of <a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/5/api/javax/jms/MessageListener.htm
 l" rel="nofollow">MessageListener</a> instances. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>durableSubscriptionId</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> Required for a durable
subscriptions. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>exchangePattern</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>InOnly</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
Sets the Consumers message exchange pattern. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>messageSelector</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> Sets the message selector. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>synchronous</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td
colspan="1" rowspan=
 "1" class="confluenceTd"> Sets whether the Endpoint will use synchronous or asynchronous
processing. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>transacted</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
If the endpoint should use a JMS Session transaction. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionBatchCount</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>1</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> The number of exchanges
to process before committing a local JMS transaction.  The <tt>transacted</tt>
property must also be set to true or this property will be ignored. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionBatchTimeout</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>5000</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> The amount of tim
 e a the transaction will stay open between messages before committing what has already been
consumed.  Minimum value is 1000ms. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>ttl</tt> </td><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>-1</tt> </td><td colspan="1" rowspan="1"
class="confluenceTd"> Disabled by default.  Sets the Message time to live header. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -360,6 +360,16 @@ sjms:queue:transacted.batch.consumer?tra
 
 <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 <tt>transactionBatchTimeout</tt>
parameter.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+sjms:queue:transacted.batch.consumer?transacted=<span class="code-keyword">true</span>&amp;transactionBatchCount=10&amp;transactionBatchTimeout=2000
+</pre>
+</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 benifit.</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" style="border-width: 1px;"><div class="codeContent panelContent">



Mime
View raw message