Another client connected with the same client id

Hi, my client when it is trying to reconnect, The broker does not let my client to reconnect

2024-09-16 11:41:35,392 - Client ID: 55af683e08ae41b999a5f9263e7c55a4-caller, IP: 127.0.0.6 was disconnected. reason: Another client connected with the same client id..
2024-09-16 11:41:35,396 - Client ID: 55af683e08ae41b999a5f9263e7c55a4-caller session has expired at 2024-09-16T11:41:35.392Z. All persistent data for this client has been removed.
2024-09-16 11:41:35,398 - Client ID: 55af683e08ae41b999a5f9263e7c55a4-caller, IP: 127.0.0.6, Clean Start: false, Session Expiry: 0 connected.
2024-09-16 11:42:37,120 - Client ID: 55af683e08ae41b999a5f9263e7c55a4-caller, IP: 127.0.0.6 was disconnected. reason: Another client connected with the same client id..
2024-09-16 11:42:37,124 - Client ID: 55af683e08ae41b999a5f9263e7c55a4-caller session has expired at 2024-09-16T11:42:37.120Z. All persistent data for this client has been removed.
2024-09-16 11:42:37,125 - Client ID: 55af683e08ae41b999a5f9263e7c55a4-caller, IP: 127.0.0.6, Clean Start: false, Session Expiry: 0 connected.
2024-09-16 11:43:38,934 - Client ID: 55af683e08ae41b999a5f9263e7c55a4-caller, IP: 127.0.0.6 was disconnected. reason: Another client connected with the same client id..
2024-09-16 11:43:38,937 - Client ID: 55af683e08ae41b999a5f9263e7c55a4-caller session has expired at 2024-09-16T11:43:38.934Z. All persistent data for this client has been removed.

According to this document the broker need to let client take over What Is MQTT Keep Alive and Client Take-Over? – MQTT Essentials Part 10

Looking at your logs - it is saying that there is another client using the same client_id.

If a client is connected and another client comes along with the same id, then the MQTT spec says that the 1st one will be disconnected.

If you don’t supply a client id, the broker will just assign a random one and then you won’t get this behaviour

The alternative is to make sure your client picks a random id