Author: jstrachan
Date: Mon Jun 19 09:49:30 2006
New Revision: 415373
URL: http://svn.apache.org/viewvc?rev=415373&view=rev
Log:
Latest export from confluence
Modified:
incubator/activemq/site/message-groups.html
Modified: incubator/activemq/site/message-groups.html
URL:
http://svn.apache.org/viewvc/incubator/activemq/site/message-groups.html?rev=415373&r1=415372&r2=415373&view=diff
==============================================================================
--- incubator/activemq/site/message-groups.html (original)
+++ incubator/activemq/site/message-groups.html Mon Jun 19 09:49:30 2006
@@ -258,6 +258,16 @@
<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-ExampleUseCase"></A>Example Use Case</H3>
+
+<P>Lets say we are doing some kind of order matching system where people are
buying and selling things (stocks, shares, placing online bets, whatever).</P>
+
+<P>You want to have consumers who match bids and offers for different items
(stocks / bets) so they want to keep in RAM for performance a sub-set of the
data set.</P>
+
+<P>So set the JMSXGroupID to be MSFT, IBM, SUNW and so forth to use the stock
symbol to define the message group. (It can be any string whatsoever; maybe
combining trading book, trading exchange, date and so forth - the more specific
the group ID, the more concurrent you can run).</P>
+
+<P>So assuming we are buying and selling MSFT, IBM, SUNW shares; the Message
Groups feature guarrentees that all the MSFT messages will be processed in
order by the same consumer; ditto for IBM and SUNW.</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>
@@ -296,16 +306,6 @@
<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>
-<H3><A name="MessageGroups-Example"></A>Example</H3>
-
-<P>Lets say we are doing some kind of order matching system where people are
buying and selling things (stocks, shares, placing online bets, whatever).</P>
-
-<P>You want to have consumers who match bids and offers for different items
(stocks / bets) so they want to keep in RAM for performance a sub-set of the
data set.</P>
-
-<P>So set the JMSXGroupID to be MSFT, IBM, SUNW and so forth to use the stock
symbol to define the message group. (It can be any string whatsoever; maybe
combining trading book, trading exchange, date and so forth - the more specific
the group ID, the more concurrent you can run).</P>
-
-<P>So assuming we are buying and selling MSFT, IBM, SUNW shares; the Message
Groups feature guarrentees that all the MSFT messages will be processed in
order by the same consumer; ditto for IBM and SUNW.</P>
-
<H3><A name="MessageGroups-Impliciations"></A>Impliciations</H3>
<P>Message Groups mean you get the power of <B>grid</B> processing of messages
across a cluster of consumers with reliability, auto-failover, load balancing
but you can also order the processing of messages too. So its the best of both
worlds.</P>
@@ -341,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
- (<A
href="http://goopen.org/confluence/pages/diffpages.action?pageId=231&originalId=8813">view
change</A>)
+ (<A
href="http://goopen.org/confluence/pages/diffpages.action?pageId=231&originalId=8814">view
change</A>)
(<A
href="http://goopen.org/confluence/pages/editpage.action?pageId=231">edit
page</A>)
</DIV>