Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-7464

ServerSession run does not copy message before dispatch; rollback delivered ack messageId can get corrupted by direct forward, leading to "Could not correlate acknowledgment with dispatched message" JMSException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.15.0
    • 5.16.0
    • JCA Container, JMS client
    • None

    Description

      An MDB, that directly forwards its message can lead to unmatched acks on rollback.

      .. onMessage(Message m) {
        producer.send(m);
        ..
      }

      The root cause is ServerSession.run not doing a message copy before up call to the listener.
      An unmatched delivered ACK causes a broker error and JMS exception "Could not correlate acknowledgment with dispatched message".
      That error closes the connection which prevents normal rollback and redelivery processing.

      The fix is to copy, in the same way as a regular message consumer, such that the application is free to do what every it wants to the message.

      Attachments

        Activity

          People

            gtully Gary Tully
            gtully Gary Tully
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: