lapin icon indicating copy to clipboard operation
lapin copied to clipboard

Heartbeat timeout handling

Open ystasivs opened this issue 2 years ago • 2 comments

Hello, i wonder how client handles heartbeat timeout. From source it's clear to me that new valid heartbeat from server does nothing but just log. Is it possible to run within lapin custom handler that will do the reconnect on timeout?

ystasivs avatar Mar 15 '22 17:03 ystasivs

A heartbeat timeout will trigger a connection error, resolving all pending futures with an error.

Lapin currently doesn't support automatic reconnection as of now (see #312 )

Keruspe avatar Mar 22 '22 12:03 Keruspe

You can also register a callback here which will be called: https://docs.rs/lapin/latest/lapin/struct.Connection.html#method.on_error

Keruspe avatar Mar 22 '22 12:03 Keruspe