Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-3319

Message Timestamps not set for MQTT

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.16.0, 2.17.0
    • None
    • MQTT
    • None
    • Apache Artemis 2.16.0 and 2.17.0 (via docker).

      Clients used for testing:

       * mosquitto_sub with "-C" (aka clean session flag false)

       * mosquitto_pub

    Description

      Messages coming in via MQTT always have timestamp 0 (which shows as 1970-01-01 01:00:00 in the management console when browsing queues of MQTT clients).

      As quick search inside the artemis-protocols folder of the source code shows that the method call setTimestamp appears in the CORE, AMQP and STOMP protocols, but not inside the MQTT protocol source:

      grep -r setTimestamp | grep -v '^tests\|/test/'

      It seems there should be a call to message.setTimestamp(System.currentTimeMillis()) inside MQTTUtil.createServerMessage().

      Also, although expiry-delay has been set to 120000 in the address-settings, the Timestamp and Expires values for MQTT messages are exactly the same, so a call to setExpiration or setJMSExpiration may be missing too (but maybe it is just a consequence of the missing timestamp).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ahubert_rise Andreas Hubert
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: