Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-1670

artemis-jms-client does not correctly handle JMSDeliveryTime default value

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • AMQ 7.2.0.GA
    • core-jms-client
    • None
    • Hide
      13259 + java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-LATEST.jar sender --msg-priority 5 --log-msgs dict --count 1 --msg-durable True --address unknowntestd9e8WeB
      13259   {'address': 'unknowntestd9e8WeB', 'group-id': None, 'subject': None, 'user-id': None, 'correlation-id': None, 'content-encoding': None, 'priority': 5, 'type': None, 'ttl': 0, 'absolute-expiry-time': 0, 'content': None, 'redelivered': False, 'reply-to-group-id': None, 'durable': True, 'delivery-time': 0, 'group-sequence': 0, 'creation-time': 1529493291158, 'content-type': None, 'id': '2690e73a-747b-11e8-82c2-b69380984454', 'reply-to': None, 'properties': {'JMSXDeliveryCount': '0'}}
      13259 / 0
      13298 + java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-LATEST.jar receiver --log-msgs dict --count 1 --address unknowntestd9e8WeB
      13298   {'address': 'unknowntestd9e8WeB', 'group-id': None, 'subject': None, 'user-id': None, 'correlation-id': None, 'content-encoding': None, 'priority': 5, 'type': None, 'ttl': 0, 'absolute-expiry-time': 0, 'content': None, 'redelivered': False, 'reply-to-group-id': None, 'durable': True, 'delivery-time': 0, 'group-sequence': 0, 'creation-time': 1529493291158, 'content-type': None, 'id': '2690e73a-747b-11e8-82c2-b69380984454', 'reply-to': None, 'properties': {'JMSXDeliveryCount': '1'}}
      13298 / 0
      

      Legend:

      pid + newly started command
      pid   stdout from process
      pid / error code of ended process
      
      Show
      13259 + java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-LATEST.jar sender --msg-priority 5 --log-msgs dict --count 1 --msg-durable True --address unknowntestd9e8WeB 13259 {'address': 'unknowntestd9e8WeB', 'group-id': None, 'subject': None, 'user-id': None, 'correlation-id': None, 'content-encoding': None, 'priority': 5, 'type': None, 'ttl': 0, 'absolute-expiry-time': 0, 'content': None, 'redelivered': False, 'reply-to-group-id': None, 'durable': True, 'delivery-time': 0, 'group-sequence': 0, 'creation-time': 1529493291158, 'content-type': None, 'id': '2690e73a-747b-11e8-82c2-b69380984454', 'reply-to': None, 'properties': {'JMSXDeliveryCount': '0'}} 13259 / 0 13298 + java -jar cli-artemis-jms/target/cli-artemis-jms-1.2.2-SNAPSHOT-LATEST.jar receiver --log-msgs dict --count 1 --address unknowntestd9e8WeB 13298 {'address': 'unknowntestd9e8WeB', 'group-id': None, 'subject': None, 'user-id': None, 'correlation-id': None, 'content-encoding': None, 'priority': 5, 'type': None, 'ttl': 0, 'absolute-expiry-time': 0, 'content': None, 'redelivered': False, 'reply-to-group-id': None, 'durable': True, 'delivery-time': 0, 'group-sequence': 0, 'creation-time': 1529493291158, 'content-type': None, 'id': '2690e73a-747b-11e8-82c2-b69380984454', 'reply-to': None, 'properties': {'JMSXDeliveryCount': '1'}} 13298 / 0 Legend: pid + newly started command pid stdout from process pid / error code of ended process

    Description

      If I send a message using the Artemis Core JMS library without setting JMSDeliveryTime, it will default to 0. If I send a message using Qpid JMS and then receive it using Artemis Core JMS, I again get a 0 from getJMSDeliveryTime.

      Both is contrary to specification. JMS 2.0 specification states:

      3.4.13. JMSDeliveryTime

      When a message is sent, the JMS provider calculates its delivery time by adding the delivery delay value specified on the send method to the time the message was sent (for transacted sends, this is the time the client sends the message, not the time the transaction is committed). It is represented as a long value which is defined as the difference, measured in milliseconds, between the delivery time time and midnight, January 1, 1970 UTC.

      On return from the send method, the message’s JMSDeliveryTime header field contains this value. When a message is received its JMSDeliveryTime header field contains this same value.

      [...]

      Qpid JMS implemented what I agree is correct behavior in https://issues.apache.org/jira/browse/QPIDJMS-289.

      Attachments

        Activity

          People

            rh-ee-ataylor Andy Taylor
            jdanek@redhat.com Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: