Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-2904 failover: protocol doesn't work within a static:() URI in a networkConnector
  3. AMQ-2579

Failover connection recovery needs a new command to indicate recovery completion that can gate dispatch on a recovered consumer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.3.0
    • 5.4.0
    • Broker
    • None

    Description

      Unconsumed messages at a consumer need to be rolledback on recovery as they can get redispatched in arbitrary order. see - https://issues.apache.org/activemq/browse/AMQ-2573
      As operations are in progress, like a send transaction, the rollback cannot happen till the send transaction commit completes so it must be async with the failover interruption. Dispatch needs to be gated on completion of the outstanding operations as it currently is with the resolution to AMQ-2573

      However there is the possibility that the broker starts to dispatch to that consumer/connection before recovery is complete and can block the receipt of messages, the response to the send commit for example as the dispatch is waiting for the send to complete so that any unconsumed messages are rolledback in advance of dispatch. With asyncDispatch=false and optimizedDispatch it is possible to simulate this.

      The solution requires two wireformat changes, An indication on a connection that it is recovering (this can be propagated to a consumer) and an indication that recovery is complete such that dispatch on a recovered consumer can complete. An additional AckMode AckRecoveryComplete could do it.
      Thus dispatch would be gated such that it cannot interfere with outstanding work that needs to be restored and completed inorder to correctly clear unconsumed and delivered messages.

      Attachments

        1. testCase.patch
          6 kB
          Gary Tully

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: