You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,7 @@ async with stompman.Client(
41
41
disconnect_confirmation_timeout=2,
42
42
write_retry_attempts=3,
43
43
check_server_alive_interval_factor=3,
44
+
no_message_restart_interval=datetime.timedelta(hours=1), # None to disable
44
45
) as client:
45
46
...
46
47
```
@@ -149,6 +150,7 @@ stompman takes care of cleaning up resources automatically. When you leave the c
149
150
- If multiple servers were provided, stompman will attempt to connect to each one simultaneously and will use the first that succeeds. If all servers fail to connect, an `stompman.FailedAllConnectAttemptsError` will be raised. In normal situation it doesn't need to be handled: tune retry and timeout parameters in `stompman.Client()` to your needs.
150
151
151
152
- When connection is lost, stompman will attempt to handle it automatically. `stompman.FailedAllConnectAttemptsError` will be raised if all connection attempts fail. `stompman.FailedAllWriteAttemptsError` will be raised if connection succeeds but sending a frame or heartbeat lead to losing connection.
153
+
- If no messages are received for `no_message_restart_interval` (defaults to 1 hour), stompman will force a reconnect. Set to `None` to disable.
152
154
- To implement health checks, use `stompman.Client.is_alive()` — it will return `True` if everything is OK and `False` if server is not responding.
153
155
-`stompman` will write log warnings when connection is lost, after successful reconnection or invalid state during ack/nack.
0 commit comments