IoT broker: Publish mqtt messages with messageExpiry doesn't seem to work

0

I'm using boto3 to publish messages to some mqtt topic. I've tried both approaches retain=True and retain=False messages with a generally low value for messageExpiry (initially 10 seconds and then 1, 60, 120, and other values in case that was the issue) but it doesn't seem to work.

With retain=True I'd expect the message to expire and delete itself after messageExpiryseconds, but it doesn't (a client connecting after the publish does receive the message, of course). With retain=False I would expect a client that connects a few seconds after the publish operation (but before messageExpiry seconds) to receive the published message, but it doesn't.

So not sure if I'm missing some configuration, messageExpiry doesn't work as I would expect (though according to the table from https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt5 it should work) or I'm doing something wrong.

jesusgs
posta un anno fa291 visualizzazioni
3 Risposte
0
Risposta accettata

When the original question was posted they weren't working. They do work now as expected.

jesusgs
con risposta 9 mesi fa
  • Correct. I neglected to post a comment back here that it was confirmed as a bug. The fix was deployed a couple of months ago.

0

Hi jesusgs. I concur with your findings. In using either boto3 or the AWS CLI, I find that the messageExpiry parameter isn't working. Conversely, if I publish using the MQTT test client in AWS IoT Core, it does work.

I'm of the (perhaps mistaken) belief it's an issue on our side with the IoT data plane HTTP Publish operation. I've raised it internally and will post back here when I know more.

profile pictureAWS
ESPERTO
Greg_B
con risposta un anno fa
  • I'm facing same issue with Java SDK IoT Data plane, are there any updates on this?

0
AWS
ESPERTO
con risposta 9 mesi fa
  • I added this comment in case someone comes back to this question

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande