- Newest
- Most votes
- Most comments
Hi,
The error you are seeing is indicative of using the same MQTT clientId
for both connections. This is covered here:
If you are connecting to AWS IoT using MQTT, each of your connections must be associated with an identifier known as a client ID. MQTT client IDs uniquely identify MQTT connections. If a new connection is established using a client ID that is already claimed for another connection, the AWS IoT message broker drops the old connection to allow the new connection.
Changing the clientId to be unique should resolve that. Also make sure that the AWS IoT Policy allows for the clientId's you wish to present. It's a best practice to only allow a clientId that matches a thingName
associated with the X.509 certificate, so that may need to be changed too.
Relevant content
- asked 2 years ago
- asked a year ago
- asked a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 3 years ago
Hello, I'm sending data to multiple devices. Is this the same issue? How do I change the client ID? Are they unable to subscribe to the same topic?
Sending messages to multiple devices would be another pattern. In that case the devices can
subscribe
to a common topic such ascmd/request
, and then the process sending the message canpublish
to that same topic and all subscribers will receive the message. This whitepaper goes into full detail.