Managing disconnections #25
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This closes #17
Scope of this PR is to allow a possible way to manage client disconnections to the user.
The goal is not to provide auto-reconnection but give eventually this possibility to the user.
A user can define a callback to pass to the Connection constructor that will be invoked every time a remote disconnection happens.
while auto-reconnection should be already implemented in the qpid-proton library doesn't seem working properly. I made several tests and this is not happening so to start we can introduce this approach that cause minimal modification to the original library.
This PR also implements multi-node connection. Also this functionality while in theory supported by the qpid library doesn't seem to work properly so I made an easy reimplementation
The PR was tested with one node (doing a force disconnection) and on multinode (stopping a node), plus tests have been added simulating a disconnection (through http)