activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r415369 - in /incubator/activemq/site: features.html message-groups.html
Date Mon, 19 Jun 2006 16:44:30 GMT
Author: jstrachan
Date: Mon Jun 19 09:44:29 2006
New Revision: 415369

Latest export from confluence


Modified: incubator/activemq/site/features.html
--- incubator/activemq/site/features.html (original)
+++ incubator/activemq/site/features.html Mon Jun 19 09:44:29 2006
@@ -256,7 +256,10 @@
               <a href="javascript:hideChildren()">Hide Children</a></span>
           <div class="greybox" id="children" style="display: none;">
-                                      <a href=""
+                                      <a href=""
title="Message Groups">Message Groups</a>
+              <span class="smalltext">(ActiveMQ)</span>
+              <br>
+                          <a href=""
               <span class="smalltext">(ActiveMQ)</span>
                           <a href=""
title="Per Destination Policies">Per Destination Policies</a>
@@ -290,9 +293,6 @@
               <span class="smalltext">(ActiveMQ)</span>
                           <a href=""
title="Kaha Persistence">Kaha Persistence</a>
-              <span class="smalltext">(ActiveMQ)</span>
-              <br>
-                          <a href=""
title="Message Groups">Message Groups</a>
               <span class="smalltext">(ActiveMQ)</span>
                           <a href=""
title="Networks of Brokers">Networks of Brokers</a>

Modified: incubator/activemq/site/message-groups.html
--- incubator/activemq/site/message-groups.html (original)
+++ incubator/activemq/site/message-groups.html Mon Jun 19 09:44:29 2006
@@ -258,6 +258,18 @@
 <P>Another way of explaining Message Groups is that it provides sticky load balancing
of messages across consumers; where the JMSXGroupID is kinda like a HTTP session ID or cookie
value and the message broker is acting like a HTTP load balancer.</P>
+<H3><A name="MessageGroups-HowMessageGroupswork"></A>How Message Groups
+<P>When a message is being dispatched to a consumer, the JMSXGroupID is checked. If
one is present then the broker checks to see if a consumer owns that message group. (Since
there could be a massive number of individual message groups we use hash buckets rather than
the actual JMSXGroupID string).</P>
+<P>If no consumer is associated with a message group a consumer is chosen. That JMS
MessageConsumer will receive all further messages with the same JMSXGroupID value until</P>
+	<LI>the consumer closes (or the client which created the consumer dies etc)</LI>
+	<LI>someone closes the message group by sending a message with a JMSXGroupSeq value
of zero (see below for more details)</LI>
 <H3><A name="MessageGroups-UsingMessageGroups"></A>Using Message Groups</H3>
 <P>You just need to change your JMS producers to fill in the <B>JMSXGroupID</B>
message header with some String value of your choice. e.g.</P>
@@ -275,7 +287,11 @@
 <P>You generally don&apos;t need to close a message group; just keep using it.
However if you really do want to close a group you can add a zero sequence number.</P>
 <DIV class="code"><DIV class="codeContent">
-<PRE class="code-java">message.setIntProperty(<SPAN class="code-quote">&quot;JMSXGroupSeq&quot;</SPAN>,
+<PRE class="code-java">Mesasge message = session.createTextMessage(<SPAN class="code-quote">&quot;&lt;foo&gt;hey&lt;/foo&gt;&quot;</SPAN>);
+message.setStringProperty(<SPAN class="code-quote">&quot;JMSXGroupID&quot;</SPAN>,
<SPAN class="code-quote">&quot;IBM_NASDAQ_20/4/05&quot;</SPAN>);
+message.setIntProperty(<SPAN class="code-quote">&quot;JMSXGroupSeq&quot;</SPAN>,
 <P>This then <EM>closes</EM> the message group so if another message is
sent in the future with the same message group ID it will be reassigned to a new consumer.</P>
@@ -325,7 +341,7 @@
     <DIV id="site-footer">
           Added by     <A href="">James
     last edited by     <A href="">James
Strachan</A> on Jun 19, 2006
-                  &nbsp;(<A href="">view
+                  &nbsp;(<A href="">view
       (<A href="">edit

View raw message