Question: behaviour with messageExpiryInterval + Retain

Hello HiveMQ Community,

i am currently testing MQTT5 features on “HiveMQ Cloud Free”!

According to the ebook:
Message Expiry Interval
A client can set the message expiry interval in seconds for each PUBLISH message individually. This
interval defines the period of time that the broker stores the PUBLISH message for any matching
subscribers that are not currently connected . When no message expiry interval is set, the broker must
store the message for matching subscribers indefinitely. When the retained=true option is set on the
PUBLISH message, this interval also defines how long a message is retained on a topic.

Publishing-Client:
mqtt.js which publishes just once!!!
PublishOptions: {
qos: 1,
retain: true,
properties: {
responseTopic: requestTopic,
contentType: contentTypeJson,
correlationData: correlationData,
messageExpiryInterval: 60,
}
}

Test Clients:
-MQTTX
-MQTT-Explorer

Somehow i still recv. the published Data even after 60s!?
With “Eclipse Mosquitto” (v2) for example it does not get send to the test clients after reconnect (after 60s)!

Hi @AndreasHeine,

Welcome to the Community Forum and thank you for reaching out.
I was able to verify the behaviour you are describing and can confirm that it is not compliant with the MQTTv5 specification.
A ticket with our cloud team will be raised and I will let you know as soon as this is resolved.

Thank you,
Florian

1 Like

Hi @AndreasHeine,

Happy to announce the issue has been fixed and rolled out to all HiveMQ Cloud free deployments.

Thank you again for your feedback.
Best,
Florian

Hey,

awesome!

do i have to recreate the cluster?

lg Andreas

You shouldn’t have to, no.

great!
will test it asap :wink:

case closed.

thanks!