This content has been marked as final.
Show 1 reply
-
1. Re: How to order messages that are sent from the message queue?
igarashitm Apr 12, 2013 6:15 PM (in response to puttime)1 of 1 people found this helpfulMessage Group should help you to do that:
http://docs.jboss.org/hornetq/2.2.14.Final/user-manual/en/html_single/index.html#message-grouping
If you send those messages via the connection factory which has Message Group enabled, then the messages should be received in right order.
I used RemoteConnectionFactory to send messages, so I changed the standalone-full.xml like this:
$ diff -uNr standalone-full.xml.orig standalone-full.xml --- standalone-full.xml.orig 2013-04-13 07:03:43.392481133 +0900 +++ standalone-full.xml 2013-04-13 06:59:57.673834098 +0900 @@ -330,6 +330,7 @@ <entry name="RemoteConnectionFactory"/> <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/> </entries> + <group-id>MessageGroup0</group-id> </connection-factory> <pooled-connection-factory name="hornetq-ra"> <transaction mode="xa"/>
The other option is to limit the number of delivery thread to just one, but the parameter called "max-pool-size" is only available for JBossAS 7.2 or later.