Closed PNixx closed 2 years ago
Heartbeat, formally, should not work when the Rabbit is rebooted.
I added an observer, it will notice such moments so that the client simply doesnt freeze without signs of life.
In theory, we can implement something like automatic recovery. But there are nuances here, it is not yet very clear what to do with open channels.
I fixed it in pull request #33
Version 1.3.0 with fixed PR https://github.com/phpinnacle/ridge/pull/33
Example code:
I add debug lines before write, before check condition and add log in close method https://github.com/phpinnacle/ridge/blob/0f8621758daec95aab0ba3d34534e47fd9bb1b74/src/Connection.php#L179-L195
Run script and see in log:
Checking heartbeat correctly. But I simulate RabbitMQ server down with command
brew services restart rabbitmq
I see in log: