Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heartbeat doesn't work properly #26

Closed
Volonda opened this issue Jun 15, 2021 · 0 comments
Closed

Heartbeat doesn't work properly #26

Volonda opened this issue Jun 15, 2021 · 0 comments

Comments

@Volonda
Copy link

Volonda commented Jun 15, 2021

If some reason clent not able to send heartbeats (broken network etc) RabbitMQ server will close connection automaticly on his own side, but consumer still connected to server. Clinet is waiting of new messages but they will never come, because rabbitmq dosn`t have connection (and consumer) any more .

There is code in PHPinnacle\Ridge\Connection for send heartbeats, but no code for receive it and broke connection if heartbeats didn't came at proper time.

Mybe good idea to pass callback to heartbeat init function and call it if last read was too later.

public function heartbeat(int $interval): void

public function heartbeat(int $interval, ?callable $connectionLost = null): void

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants