Announcement Announcement Module
No announcement yet.
JMS Inbound channel adaptor and transactions Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMS Inbound channel adaptor and transactions

    0 down vote favorite

    I am using SI configured with a jms:message-driven-channel-adapter. My use case is to receive a message from the queue, save it via JDBC to a database, commit the message from the queue, and then let this message continue to flow through the various channels depending on its type. If the message subsequently errors this is ok as I have the original stored in the database so it can be replayed.

    My issue is with trying to commit the transaction from the queue immediately after the database persist. This is effectively mid flow and I have only been able to get the spring transaction management to try and commit right at the end. This is not suitable as if an error is thrown after the database persist it still leaves the message on the JMS queue, as this is where the outer transaction originated.

    So, is there an easy way to pull the message from a JMS queue, save to database, then commit it off the queue and start a new transaction for the remaining flow?



  • #2
    The whole point in using JMS transactionally is to let it handle message persistence and delivery. I'm not sure why you'd want to take over this responsibility inside your application.