Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping via JMS

Status
Not open for further replies.

psynoff

Programmer
May 9, 2003
11
US
We find ourselves needing to use message grouping on our MQ network. My application is a JMS client. I've found some flags available at the Base MQ Java class level that I need to be able to specify from the JMS level:[ul][li]GetMessageOptions.options & MQC.MQGMO_ALL_MSGS_AVAILABLE[/li][li]GetMessageOptions.options & MQC.MQGMO_LOGICAL_ORDER[/li][/ul]I also need to be able to get to MQGetMessageOptions.groupStatus to figure out if I have a message that is part of a group, and if this one is the last one in the group. I think I might be able to see this through the MQMD as the JMS_IBM_Last_Msg_In_Group property.

Does IBM's JMS provider already use these flags when doing receives? If not, can I specify them somehow? I've seen the field mapping info in "Using Java", but I cannot yet see a clear path to how to receive grouped messages via JMS.

Thanks in advance for any help!!

-=david=-
 
I am also interested in knowing whether it is
possible/reasonable to mixing up base Java and JMS
together. Any answer to your own questions now?
 
It's not really possible to mix them, as I've found. There are things available at the Java base classes layer (aka MQI) that just aren't there in JMS. So, for example, when dealing with message groups in MQI you can indicate that you want all the messages to come to the same queue listener, in order, and that none of them should be delivered to a listener until all of the messages in the group have arrived. You just cannot do that with JMS. You have to collect them and stash them off to the side somewhere, and when you see that the last one has arrived, then you can process the messages you got in order.

Probably not what you wanted to hear...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top