Announcement Announcement Module
No announcement yet.
Is Sprig Batch appropriate for this use case? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is Sprig Batch appropriate for this use case?


    I have a service whose external interface is a JMS queue (Oracle Advanced Queue). This service needs to constantly listen to the queue to wait for any incoming requests. And it creates or updates records in the database.
    The message can request to create / update 1 or many records. (By allowing the message to be a batch request, my intention is to minimize network traffic. Each record is still transacted independently. )
    After processing, the sender of the message needs to be responded back with the ids of records created or updated.

    Is this a use case that the spring batch is designed for?
    Is using Spring's core DefaultMessageListenerContainer to listen to the jms queue sufficient? or is there any added benefit for using Spring Batch?
    For example, if the service fails to process the record, someone will need to be notified to diagnose if it is a data issue or system error.


  • #2
    Well, it could be. It all depends on the "many" records part. Most of the things around can be adapted to be used with Spring Batch quite easily I would say. Does processing of the records involves transformation or business logic or is it a simple update in the db?


    • #3
      I think you might find that Spring Integration is a better fit for this use case.