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

Allow getJMSRedelivered flag to survive a restart

    Details

      Description

      Jmsredelivery status is maintained by the activemq consumer and in memory by the broker when a consumer closes. If the broker is restarted, the redelivery status is lost.
      The broker never rewrites a message so the modified property is lost.

      To make the redelivery flag reliable, it needs to be persisted.

        Issue Links

          Activity

          Hide
          gtully Gary Tully added a comment -

          feature in http://svn.apache.org/viewvc?rev=1177619&view=rev

          Requires two options to enable. A connection factory needs the transactedIndividualAck=true attribute. This tells a consumer to send acks as messages are delivered. They accumulate on the broker till the transaction completes. The default behavior is to provide a single batch ack before the transaction completes, which does not allow the broker to distinguish between delivery and transaction completion.

          On the KahaDBPersistenceAdapter, rewriteOnRedelivery=true is required. This ensures that the delivery count is persisted on a transaction rollback. If the message is again read from the journal (after a restart), it will have the correct redelivery status. This makes the JMSRedelivredFlag bullet proof.

          Show
          gtully Gary Tully added a comment - feature in http://svn.apache.org/viewvc?rev=1177619&view=rev Requires two options to enable. A connection factory needs the transactedIndividualAck=true attribute. This tells a consumer to send acks as messages are delivered. They accumulate on the broker till the transaction completes. The default behavior is to provide a single batch ack before the transaction completes, which does not allow the broker to distinguish between delivery and transaction completion. On the KahaDBPersistenceAdapter, rewriteOnRedelivery=true is required. This ensures that the delivery count is persisted on a transaction rollback. If the message is again read from the journal (after a restart), it will have the correct redelivery status. This makes the JMSRedelivredFlag bullet proof.
          Hide
          lichtin Martin Lichtin added a comment -

          Gary, is this feature for KahaDB only or will it also work for JDBC persistence adapter?

          Show
          lichtin Martin Lichtin added a comment - Gary, is this feature for KahaDB only or will it also work for JDBC persistence adapter?
          Hide
          gtully Gary Tully added a comment -

          Kahadb only atm.

          Show
          gtully Gary Tully added a comment - Kahadb only atm.
          Hide
          gtully Gary Tully added a comment -

          This kahadb feature is being replaced by https://issues.apache.org/jira/browse/AMQ-5068 which provides a fully reliable solution, independent of client behaviour.

          Show
          gtully Gary Tully added a comment - This kahadb feature is being replaced by https://issues.apache.org/jira/browse/AMQ-5068 which provides a fully reliable solution, independent of client behaviour.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit c78eddce7ed3045b5508dd6713252dca8766436c in activemq's branch refs/heads/master from Gary Tully
          [ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=c78eddc ]

          revert sync ack send for https://issues.apache.org/jira/browse/AMQ-3519 due to rework in https://issues.apache.org/jira/browse/AMQ-5068 - sync send no longer needed because redelivered flag is persisted before dispatch. This avoids a roundtrip overhead on individual ack, ie priority or nonBlockingRedelivery options in the mix

          Show
          jira-bot ASF subversion and git services added a comment - Commit c78eddce7ed3045b5508dd6713252dca8766436c in activemq's branch refs/heads/master from Gary Tully [ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=c78eddc ] revert sync ack send for https://issues.apache.org/jira/browse/AMQ-3519 due to rework in https://issues.apache.org/jira/browse/AMQ-5068 - sync send no longer needed because redelivered flag is persisted before dispatch. This avoids a roundtrip overhead on individual ack, ie priority or nonBlockingRedelivery options in the mix
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f8488916c2cc04c402e437fdbc2f61f118189d08 in activemq's branch refs/heads/activemq-5.13.x from Gary Tully
          [ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=f848891 ]

          revert sync ack send for https://issues.apache.org/jira/browse/AMQ-3519 due to rework in https://issues.apache.org/jira/browse/AMQ-5068 - sync send no longer needed because redelivered flag is persisted before dispatch. This avoids a roundtrip overhead on individual ack, ie priority or nonBlockingRedelivery options in the mix

          (cherry picked from commit c78eddce7ed3045b5508dd6713252dca8766436c)

          Show
          jira-bot ASF subversion and git services added a comment - Commit f8488916c2cc04c402e437fdbc2f61f118189d08 in activemq's branch refs/heads/activemq-5.13.x from Gary Tully [ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=f848891 ] revert sync ack send for https://issues.apache.org/jira/browse/AMQ-3519 due to rework in https://issues.apache.org/jira/browse/AMQ-5068 - sync send no longer needed because redelivered flag is persisted before dispatch. This avoids a roundtrip overhead on individual ack, ie priority or nonBlockingRedelivery options in the mix (cherry picked from commit c78eddce7ed3045b5508dd6713252dca8766436c)

            People

            • Assignee:
              gtully Gary Tully
              Reporter:
              gtully Gary Tully
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development