• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS Synchronous processing of select messages

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic