[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Configure a queue to be ordering aware
gaohoward
do-not-reply at jboss.com
Sun Feb 1 10:16:19 EST 2009
So far we have implemented the strict ordering through message producer. The messaging client can control the message ordering through creating ordering groups via the producer. This is one way to do it however. Another way is by configuring a specific Queue to be an ordering group Queue. Once thus configured, the queue destination becomes a ordering aware destination -- meaning that any messages that are targeted at this queue will naturally become ordered. This way will allow the users to get message ordering without coding.
To accomplish this end, we can add a new property to QueueService. For example we name this property EnableOrderingGroup, if the value of this property is true, the Queue is ordering message group queue, as in
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=strictOrderingQueue"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| <attribute name="EnableOrderingGroup">true"</attribute>
| </mbean>
|
or in clustered case
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=strictOrderingDistributedQueue"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| <attribute name="Clustered">true</attribute>
| <attribute name="EnableOrderingGroup">true"</attribute>
| </mbean>
|
The order of each message is determined by the time of arrival at the target queue, with the earliest arrived message being the foremost of the delivering list.
https://jira.jboss.org/jira/browse/JBMESSAGING-1416
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206114#4206114
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206114
More information about the jboss-dev-forums
mailing list