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
質問済み 1年前291ビュー
3回答
0
承認された回答

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

jesusgs
回答済み 9ヶ月前
  • 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
エキスパート
Greg_B
回答済み 1年前
  • I'm facing same issue with Java SDK IoT Data plane, are there any updates on this?

0
AWS
エキスパート
回答済み 9ヶ月前
  • I added this comment in case someone comes back to this question

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ