Announcement Announcement Module
No announcement yet.
Spring Batch's support for JMS Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Batch's support for JMS

    Hello everyone,

    I am aware that we can send JMS messages from my Spring Batch to JMS Provider in JBoss. Which I am trying now.

    In the meanwhile, I wanted to ask one question to a broader development community, how can I listen for return JMS Messages in my Spring Batch?? Is it possible using Spring Batch alone? (Any Event-listening mechanism?)


  • #2
    You would probably have to poll for a reply on a known destination. Can you describe your use case in a bit more detail, so we can see why JMS makes sense?


    • #3

      What I am trying to do is, if I integrate Spring Batch with any messaging system, then, since Messaging systems are going to be asynchronous, and failure of one of the message processing should be reported back to my spring batch job/step so that accordingly I can determine that the job is not yet complete.

      I know that some of these items are scoped for Spring Batch 2.0, do we have a date for that to be released?



      • #4
        The question is really "why do you want to integrate with JMS?" If you expect the item to be processed by a listener immediately, the asynchronous reply and the delay caused by the middleware makes it wasteful, so not a very good model for item-by-item processing.

        One of the use cases I am working on is message=chunk, which makes more sense and is an efficient way to pump out work to parallel VMs. You still have to deal with the asynch reply, but the overhead per item is much lower. There are two use case with message=item that I find compelling. One is where the message processing is not mediated by expensive middleware (local synchronous processing). The other is one where you really have no idea when the item is going to be processed (it might be marked as due for processing in 2 days time) - then you ned to mark every message with knowledge of the job it is part of, and do some accountancy to make sure that every message you send is procesed before the job is finished. I call that Asynchronous Aggregator.

        You are right that all these things are on the 2.0 roadmap. I am implementing them with Spring Integration, and hope to make that code available for 1.1, but maybe still as a sandbox and bake it into the full release for 2.0. We don't have a proper plan for either 1.1 or 2.0 yet, so I can't give dates. 1.1 might be June/July, and 2.0 is targeted for 2008Q4.
        Last edited by Dave Syer; Apr 22nd, 2008, 01:34 AM. Reason: punctuation