rabbitmq-stream-go-client icon indicating copy to clipboard operation
rabbitmq-stream-go-client copied to clipboard

Heartbeat service in v2

Open Zerpet opened this issue 1 year ago • 1 comments

Summary

Implement a mechanism to receive and send heartbeats. Heartbeats should be sent when there are inactivity periods, for example, when the client is inactive (no locator operations) for some time. It should reset the timer when there's a locator operation.

More context

We want to implement a component that encapsulates the heartbeat behaviour. This component should:

  • waits on a time.Ticker to send heartbeats to the server
  • responds to heartbeats from the rabbitmq server
  • resets the ticker when there is a locator operation, a producer operation or a consumer operation

We want to reuse this component in multiple places in the codebase. We should implement its own struct to handle all this logic.

Zerpet avatar Aug 21 '23 09:08 Zerpet