File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS Synchronous processing of select messages

 
Kerry Wilson
Ranch Hand
Posts: 254
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the best way to insure that select JMS messages are processed synchronously? We are receiving batches of messages that create/update the same entity and they are stepping on each other. Luckily our model is such that the messages are easily siloed. It would be nice to be able to queue messages with a key that would make them processed synchronously.

For instance, the JMS listener would receive a message, and the queue would 'freeze' any other messages with that key such that other listeners would not get them. When the listener that got the last message returns, it would first receive any messages with the same key as the last one.

Is there anything within JMS that deals with this kind of scenario?
 
E Armitage
Rancher
Posts: 989
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you are looking for synchronous delivery here. Synchronous would almost require a request/response pattern which is not what you are looking for. (If you are looking for synchronous communication then have a look at http://myadventuresincoding.wordpress.com/2011/10/15/jms-how-to-do-synchronous-messaging-with-activemq-in-scala/) which you can adapt for your JMS provider and language.

You seem to be trying to do message aggregation. Some providers provide this feature e.g Message grouping in IBM MQ (http://www.ibm.com/developerworks/websphere/library/techarticles/0602_currie/0602_currie.html) or for Camel (http://camel.apache.org/aggregator2.html)
 
Kerry Wilson
Ranch Hand
Posts: 254
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! Sounds like there is nothing in the spec for this. We are using Oracle JMS, maybe they have a similar feature.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic