Results 1 to 2 of 2

Thread: Posting on multiple queues using single job/ JMSwriter

  1. #1
    Join Date
    Mar 2013
    Posts
    1

    Smile Posting on multiple queues using single job/ JMSwriter

    Hi All,

    I am a newbie at Spring Batch and have recently started using it.

    I have a requirement where I need to post/write the messages read from each DB record on different queues using single Job. As I have to use reader to read the messages from DB and use processor to decide on which queue I have to post it.

    So my question is Can I use single JMSwriter to post the messages on different queues as I have to use single Job and DB Reader.

    Thanks in Advance

  2. #2
    Join Date
    Sep 2008
    Location
    Chicagoland, IL
    Posts
    348

    Default

    I'd recommend using the ClassifierCompositeItemWriter. This ItemWriter allows you to develop a Classifier implementation that would be used to determine which queue to write it to. You can read more about this ItemWriter here: http://static.springsource.org/sprin...temWriter.html
    Michael Minella
    Spring Batch Lead
    Author - Pro Spring Batch
    http://www.michaelminella.com
    Twitter: @MichaelMinella

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •