phpinnacle / ridge

Pure asynchronous PHP implementation of the AMQP 0-9-1 protocol.
MIT License
50 stars 13 forks source link

Handle failure situations in channels + client #39

Closed brstgt closed 1 year ago

brstgt commented 1 year ago

Description

The current implementation has no way to properly monitor failure situations. This MR fixes it.

Motivation and context

There are multiple ways of failures and it's broken in many ways:

All these things are important to build a resilient and fault tolerant system with this library.

How has this been tested?

Manually tested different failure cases with a cluster of 3 nodes:

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

Depends on how you look at it. It's both a new feature (monitoring connecitons) and fixing a lot of issues with the current error handling.

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

If you're unsure about any of these, don't hesitate to ask. We're here to help!

=> Regarding tests: I have not written system tests for it. It's quite hard to write automated tests for failing infrastructure. What's your opinion?