Add auto reconnect support (#31)
* Update mqtt-client.php * Update ConnectionManager.php * Update mqtt-client.php * Update mqtt-client.php * Update mqtt-client.php * Update ConnectionManager.php * Update mqtt-client.php * Add and normalize auto-reconnect settings * Add .gitkeep * Remove .gitkeep Co-authored-by: Marvin Mall <marvin-mall@msn.com>
This commit is contained in:
@ -101,6 +101,14 @@ return [
|
||||
// The interval (in seconds) in which the client will send a ping to the broker,
|
||||
// if no other message has been sent.
|
||||
'keep_alive_interval' => env('MQTT_KEEP_ALIVE_INTERVAL', 10),
|
||||
|
||||
// Additional settings for the optional auto-reconnect. The delay between reconnect attempts is in seconds.
|
||||
'auto_reconnect' => [
|
||||
'enabled' => env('MQTT_AUTO_RECONNECT_ENABLED', false),
|
||||
'max_reconnect_attempts' => env('MQTT_AUTO_RECONNECT_MAX_RECONNECT_ATTEMPTS', 3),
|
||||
'delay_between_reconnect_attempts' => env('MQTT_AUTO_RECONNECT_DELAY_BETWEEN_RECONNECT_ATTEMPTS', 0),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
],
|
||||
|
Reference in New Issue
Block a user