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
feita há um ano291 visualizações
3 Respostas
0
Resposta aceita

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

jesusgs
respondido há 9 meses
  • 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
ESPECIALISTA
Greg_B
respondido há um ano
  • I'm facing same issue with Java SDK IoT Data plane, are there any updates on this?

0
AWS
ESPECIALISTA
respondido há 9 meses
  • I added this comment in case someone comes back to this question

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas