Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-1846

[message expiry, consumer side] message can remain inflight after expired by consumer side

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBoss A-MQ 6.3
    • JBoss A-MQ 6.2.1
    • broker
    • None
    • Hide

      Workaround: call "connection.setConsumerExpiryCheckEnabled(false)" on the consumer connectionFactory to ensure the message is not expired on the consumer.

      Show
      Workaround: call "connection.setConsumerExpiryCheckEnabled(false)" on the consumer connectionFactory to ensure the message is not expired on the consumer.
    • Hide

      attaching a unit test.

      NOTE: The BrokerFliter is used to manipulate the expiration timestamp on the message when it is sent and ack'd from the consumer to simulate a time difference between broker and client in the unit test. This is rather invasive but it it difficult to test this deterministically in a unit test.

      Show
      attaching a unit test. NOTE: The BrokerFliter is used to manipulate the expiration timestamp on the message when it is sent and ack'd from the consumer to simulate a time difference between broker and client in the unit test. This is rather invasive but it it difficult to test this deterministically in a unit test.

    Description

      if the client clock is slightly ahead of the brokers clock a message could be expired on the client but not considered expired on the broker.

      When the expiry ack is sent to the broker it checks if the message is also considered expired on the broker side. If the broker clock is behind the client side clock the message could be considered not expired on the broker and not
      removed from the broker's dispatched list. This leaves the broker reporting a message inflight from the broker's perspective even though the message has been expired on the consumer(client) side

      The broker checks when it receives the expiry ack in org.apache.activemq.broker.region.PrefetchSubscription#acknowledge(org.apache.activemq.broker.ConnectionContext, org.apache.activemq.command.MessageAck)

      Perhaps the broker should respect the client side expiry when it is active rather than checking for itself ? Otherwise it will be difficult to reconcile the broker's view and clients view.

      Attachments

        Issue Links

          Activity

            People

              tbish@redhat.com Timothy Bish (Inactive)
              rhn-support-pfox Patrick Fox (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: