Question: behaviour with messageExpiryInterval = 0 + Retain = true

thats was not the question!

there is an actual issue that a published message does not get delivered from HiveMQ Cloud Broker (Retain=True and MessageExpiary=0) but from the Testserver (Mosquitto)

i guess after:

there is still an little issue that the expiarytimer…

according to MQTT5 Spec:

3.3.2.3.3 Message Expiry Interval`

2 (0x02) Byte, Identifier of the Message Expiry Interval.

Followed by the Four Byte Integer representing the Message Expiry Interval.

If present, the Four Byte value is the lifetime of the Application Message in seconds. If the Message Expiry Interval has passed and the Server has not managed to start onward delivery to a matching subscriber, then it MUST delete the copy of the message for that subscriber [MQTT-3.3.2-5].

If absent, the Application Message does not expire.

The PUBLISH packet sent to a Client by the Server MUST contain a Message Expiry Interval set to the received value minus the time that the Application Message has been waiting in the Server [MQTT-3.3.2-6]. Refer to section 4.1 for details and limitations of stored state.

what i am referring is that → “If absent, the Application Message does not expire.” which i would interpret as 0 = No expiration. Like Mosquitto did it in their Broker!

regards Andreas