# How to increase maximum broker reconnect attempts in management center?

**URL:** <https://forum.cedalo.com/t/how-to-increase-maximum-broker-reconnect-attempts-in-management-center/874>\
**Category:** Broker management and monitoring\
**Created:** [October 6, 2023, 10:25am UTC](https://forum.cedalo.com/t/how-to-increase-maximum-broker-reconnect-attempts-in-management-center/874 "2023-10-06T10:25:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kushagra](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@kushagra](https://forum.cedalo.com/u/kushagra)\
**Post date:** [October 6, 2023, 10:25am UTC](https://forum.cedalo.com/t/how-to-increase-maximum-broker-reconnect-attempts-in-management-center/874/1 "2023-10-06T10:25:22Z")

</div>

After adding a broker connection in Management center and connecting successfully to it. If broker becomes unavailable then the management center will try to re-connect with it up to maximum 10 times by default.  
Is there any way to increase the maximum number of attempts to reconnect to the broker?

---

<div class="post-metadata">

**Author:** ![Tizian](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.cedalo.com/tizian/32/33_2.png) [@Tizian](https://forum.cedalo.com/u/Tizian)\
**Post date:** [October 6, 2023, 10:44am UTC](https://forum.cedalo.com/t/how-to-increase-maximum-broker-reconnect-attempts-in-management-center/874/2 "2023-10-06T10:44:01Z")

</div>

Hello,

Yes we have the possibility to add environment vars in the docker.compose file:

`CEDALO_MC_MQTT_CONNECT_INITIAL_BACKOFF_INTERVAL_MS` - initial interval that MMC will wait before attempting to reconnect. In milliseconds. Default is 500.  
`CEDALO_MC_MQTT_CONNECT_BACKOFF_INCREASE_RATE` - coeficient that will be multiplied with `CEDALO_MC_MQTT_CONNECT_INITIAL_BACKOFF_INTERVAL_MS` on every subsequent reconnection attempt. Introduced to make reconnect intervals increase over time (1 second, 2 second, 4 seconds and so on…). If you want all the reconnect intervals to stay constant, specify 1. Default is 1.5.  
`CEDALO_MC_MQTT_CONNECT_MAX_NUMBER_OF_ATTEMPTS` - number of reconnection attempts. After reaching this number, MMC stops trying to reconnect.

Reconnection only takes place if before a successful connection with the broker was established and interrupted afterward.  
Note that on a fresh start, MMC attempts only a single connection for connections that are disconnected due to an error/interruption.

Hope that helps 🙂

---

<div class="post-metadata">

**Author:** ![kushagra](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@kushagra](https://forum.cedalo.com/u/kushagra)\
**Post date:** [October 6, 2023, 11:09am UTC](https://forum.cedalo.com/t/how-to-increase-maximum-broker-reconnect-attempts-in-management-center/874/3 "2023-10-06T11:09:44Z")

</div>

Thanks for the quick Reply! Is there a reference page for getting details about all the parameters available?

---

<div class="post-metadata">

**Author:** ![Tizian](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.cedalo.com/tizian/32/33_2.png) [@Tizian](https://forum.cedalo.com/u/Tizian)\
**Post date:** [October 6, 2023, 11:13am UTC](https://forum.cedalo.com/t/how-to-increase-maximum-broker-reconnect-attempts-in-management-center/874/4 "2023-10-06T11:13:07Z")

</div>

For the env vars currently not. But I think it makes sense to create one to have these not only internally available. Will talk to the team. Thank you for the input. 🙂
