activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
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

URL: http://svn.apache.org/viewvc?rev=415369&view=rev
Log:
Latest export from confluence

Modified:
    incubator/activemq/site/features.html
    incubator/activemq/site/message-groups.html

Modified: incubator/activemq/site/features.html
URL: http://svn.apache.org/viewvc/incubator/activemq/site/features.html?rev=415369&r1=415368&r2=415369&view=diff
==============================================================================
--- 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>
           <div class="greybox" id="children" style="display: none;">
-                                      <a href="http://goopen.org/confluence/display/ACTIVEMQ/MasterSlave"
title="MasterSlave">MasterSlave</a>
+                                      <a href="http://goopen.org/confluence/display/ACTIVEMQ/Message+Groups"
title="Message Groups">Message Groups</a>
+              <span class="smalltext">(ActiveMQ)</span>
+              <br>
+                          <a href="http://goopen.org/confluence/display/ACTIVEMQ/MasterSlave"
title="MasterSlave">MasterSlave</a>
               <span class="smalltext">(ActiveMQ)</span>
               <br>
                           <a href="http://goopen.org/confluence/display/ACTIVEMQ/Per+Destination+Policies"
title="Per Destination Policies">Per Destination Policies</a>
@@ -290,9 +293,6 @@
               <span class="smalltext">(ActiveMQ)</span>
               <br>
                           <a href="http://goopen.org/confluence/display/ACTIVEMQ/Kaha+Persistence"
title="Kaha Persistence">Kaha Persistence</a>
-              <span class="smalltext">(ActiveMQ)</span>
-              <br>
-                          <a href="http://goopen.org/confluence/display/ACTIVEMQ/Message+Groups"
title="Message Groups">Message Groups</a>
               <span class="smalltext">(ActiveMQ)</span>
               <br>
                           <a href="http://goopen.org/confluence/display/ACTIVEMQ/Networks+of+Brokers"
title="Networks of Brokers">Networks of Brokers</a>

Modified: incubator/activemq/site/message-groups.html
URL: http://svn.apache.org/viewvc/incubator/activemq/site/message-groups.html?rev=415369&r1=415368&r2=415369&view=diff
==============================================================================
--- 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
work</H3>
+
+<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>
+
+<UL>
+	<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>
+</UL>
+
+
 <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>,
0);</PRE>
+<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>,
0);
+...
+producer.send(message);</PRE>
 </DIV></DIV>
 
 <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="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A>,
     last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A> on Jun 19, 2006
-                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=231&originalId=8809">view
change</A>)
+                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=231&originalId=8813">view
change</A>)
               
       (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=231">edit
page</A>)
     </DIV>



Mime
View raw message