-
1. Re: Guaranteed ordering of messges in HornetQ
jbertram Jul 3, 2014 11:18 AM (in response to sankarts)1) Similar to Message Unit-of-Order support in WebLog8ic JMS (please refer the pointer as below), is there any equivalent mechanism supported in HornetQ?
Yes, I believe our "message group" feature is equivalent to this.
2) Whether message grouping ensures that all the messages of the group are always consumed by the same consumer.
Yes, a "message group" is bound to a particular consume until that consumer is closed and then another consumer is selected.
Does "Message Group" also support "guarranteed ordering of the processing of messages across the group"?
A single consumer can only process a single message at a time so the messages in the group will be consumed in order.
3) How about the proven &/ documented mechanism, by which message sequencing can be achieved.
I'm not sure what your asking here. It sounds like you're just rephrasing your question about message grouping. Please elaborate if you need further clarification on HornetQ message grouping.
-
2. Re: Re: Guaranteed ordering of messges in HornetQ
sankarts Jul 16, 2014 6:03 AM (in response to jbertram)Thanks Justin for the quick response.
My query
Since my development environment has multiple producers as well as multiple consumers, to be specific WildFly cluster
To elaborate, a cluster of 2 WildFly instances are running in standalone mode. Each WildFly server has been deployed with my custom MDB. When the messages are received by the cluster, by default, message load-balancing between both the WildFly/HornetQ servers happen.
To achieve the "sequence of messages",
While producing & sending, I make use of unique Group ID for all the related messages, so that they should get consumed by the same consumer and in the same order.
msg.setObject(myMsg);
msg.setStringProperty("JMSXGroupID", uniqueGroupId);
In nutshell, I would like to support "Message Unit-of-Order" among WildFly/HornetQ cluster.
I referred to 28.5 Clustered Grouping (please refer the link below), but not sure about how / where I can configure "grouping-handler" etc in "standalone-full-ha.xml"?
Any help / pointers on this would be appreciated.
Thanks,
Shankar
-
3. Re: Re: Re: Guaranteed ordering of messges in HornetQ
mnovak Jul 16, 2014 9:17 AM (in response to sankarts)Just put this to first server:
<subsystem xmlns="urn:jboss:domain:messaging:..."> <hornetq-server> ... <grouping-handler name="my-grouping-handler"> <type>LOCAL</type> <address>jms</address> <timeout>5000</timeout> </grouping-handler> ... </hornetq-server> </subsystem>
and this to second server:
<subsystem xmlns="urn:jboss:domain:messaging:..."> <hornetq-server> ... <grouping-handler name="my-grouping-handler"> <type>REMOTE</type> <address>jms</address> <timeout>5000</timeout> </grouping-handler> ... </hornetq-server> </subsystem>