-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscribing a topic with QoS1 results in duplicate messages #12
Comments
Hi @shekharhimanshu, |
Hello @vareddy I will try to reproduce the issue with PubSub sample and let you know. |
I tried with the latest SDK version as well and there was no change in the behavior. |
Hi @shekharhimanshu, |
Hi @shekharhimanshu, |
Hey @vareddy, Can you explain what you changed in the SDK to fix the duplicate issue? I was using the Embedded C SDK before and saw the duplicate issue there when publishing with QoS 1. I created an issue on their GitHub (aws/aws-iot-device-sdk-embedded-C#169) and the resolution was that since the AWS broker does not support the duplicate flag, we would have to add our own IDs in the payload and filter ourselves. However, it seems like the C++ SDK has solved the duplicate problem without forcing clients to implement custom logic? |
Hi @twebner, |
Thanks @vareddy! So it sounds like something similar could be done in the C SDK, right? Is there any way for you to contact that team and share your solution with them? Maybe you could reopen and comment on the issue I linked in my comment above? |
Hi @shekharhimanshu and @vareddy Thanks, |
You can set QoS when creating a Subscription. |
Thank you @shekharhimanshu for your quick reply. |
See, PubSub sample for example.
That depends upon what you are trying to do. If you are using this SDK, you do it with this SDK. If by CLI you mean the aws-cli, I haven't explored it much with regards to IoT pub sub. You can check the documentation to check for available commands. |
Hello,
I am not sure if this is by design or a bug, but subscribing a topic with QoS1 always results in duplicate messages. However, these messages don't have the DUP flag set to 1. So it is as if the AWS MQTT broker is re-sending the same message over and over again or there is some issue inside the SDK.
I tried to debug the issue and found few interesting observations:
For now, as a workaround I have refrained from using QoS 1 when subscribing to AWS MQTT topics but this behavior is something not desirable and might have unknown consequences when used in production.
Could you please look into this issue?
The text was updated successfully, but these errors were encountered: