By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Iot Core reconnections issue

0

Hi, we are developing an android service which connects to iot core and subscribes to various topics. The problem comes when you momentarily lose connection and recover it again. We try to make the connection again but it disconnects us due to a duplicate clientId. We have tried with the cleanSession parameter both true and false but it neither resumes the previous connection or creates a new one. Any idea what is happening?

asked a year ago505 views
1 Answer
1

Hi

IoT Core has not realised that your app lost connection, the keep alive time must expire for that. You can try and do an reconnect with exponential backoff, to give IoT Core time to disconnect.

However, it should be the previous client that is disconnected. Have you checked that you get disconnect on your new connection and not on the old?

See the life cycle documentation.

The client is using a client ID that is already in use. In this case, the client that is already connected will be disconnected with this disconnect reason.
profile picture
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions