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

AMQP test client delivery/redelivery anomoly

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.11.0
    • 5.12.0
    • AMQP, Broker
    • None
    • broker: snapshot apache-activemq-5.11-20141022.222801-124-bin.tar.gz
      Wed Oct 22 22:28:02 UTC 2014
      host: Linux Fedora 19 x64
      clients: Apache Qpid C++ messaging qpid-send qpid-receive (current trunk)
      protocol: AMQP 1.0

    Description

      Using Apache Qpid test clients qpid-send and qpid-receive ActiveMQ broker behaves differently from qpidd and I'm wondering if the difference is important.

      The test code command lines are:

      qpid-send -a "chuck; {create:always}" --connection-options {protocol:amqp1.0} --sequence yes --content-string 0
      qpid-receive -a chuck -m 1 --connection-options "{protocol:amqp1.0}" --print-headers yes
      

      When I run the tests against qpidd they send one message and receive one message every time. However against ActiveMQ 5.11 the qpid-receive does not receive the message until one of several conditions:

      • the qpid-receive command also includes "--timeout 1"
      • the qpid-receive command is repeated several, possibly dozens, of times.

      When qpidd broker is running or when activemq is running and --timeout is specified then the qpid-receive output is:

      chug@FJELD ~> qpid-receive -a chuck -m 1 --connection-options "{protocol:amqp1.0}" --print-headers yes
      Properties: {sn:1, ts:1414177685195174548, x-amqp-first-acquirer:True}
      
      0
      

      However, activemq running the client twice without the timeout and once with the timeout looks like this:

      chug@FJELD ~> qpid-receive -a chuck -m 1 --connection-options "{protocol:amqp1.0}" --print-headers yes
      chug@FJELD ~> qpid-receive -a chuck -m 1 --connection-options "{protocol:amqp1.0}" --print-headers yes
      chug@FJELD ~> qpid-receive -a chuck -m 1 --connection-options "{protocol:amqp1.0}" --print-headers yes --timeout 1
      Redelivered: true
      Properties: {sn:1, ts:1414178091185765136, x-amqp-delivery-count:1}
      
      0
      

      The false receive attempts make the message look like it was already delivered, hence the Redelivered: true, first-acquirer absent and the x-amqp-delivery-count setting.

      Views of the protocol interactions between the brokers and clients are here:
      http://people.apache.org/~chug/adverb_qpid_send_receive_1/

      I ran the tests twice on ActiveMQ with the tcpnodelay option turned on and off but that didn't seem to make any difference.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tabish Timothy A. Bish
            chug Charles E. Rolke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment