You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2022/01/13 04:22:00 UTC

[jira] [Resolved] (ARTEMIS-3319) Message Timestamps not set for MQTT

     [ https://issues.apache.org/jira/browse/ARTEMIS-3319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Bertram resolved ARTEMIS-3319.
-------------------------------------
    Resolution: Duplicate

> Message Timestamps not set for MQTT
> -----------------------------------
>
>                 Key: ARTEMIS-3319
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3319
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: MQTT
>    Affects Versions: 2.16.0, 2.17.0
>         Environment: 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
>            Reporter: Andreas Hubert
>            Priority: Major
>
> 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:
> {code:java}
> grep -r setTimestamp | grep -v '^tests\|/test/'{code}
> 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).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)