Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

JMS Synchronous processing of select messages

 
Ranch Hand
Posts: 254
  • 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?
 
Rancher
Posts: 989
9
  • 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
  • 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.
 
rubbery bacon. rubbery tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic