rust-amqp
rust-amqp copied to clipboard
Implement connection heartbeating.
open questions
Heartbeats are great, and are working as of this PR; however, until we implement an auto-reconnect algorithm, heartbeats are not super effective. Do we want to include an auto-reconnect implementation here as well? Or does it suffice to simply close the underlying TCP connection for now?
TODO:
- [x] resolve build failure (simple issue related to openssl).
- [ ] add pertinent changelog entries.
- [ ] update README and docs on heartbeating. Note that a heartbeat interval of
0disables heartbeats for the connection. - [ ] look into adding connection recovery pattern.
- [ ] explore idea for removing the channel number param in
Session.open_channel. Use an internal mutex for keeping track of used channels, reclaiming dropped channels, and allowingSessionto beSyncso that we can follow the "channel per thread" more practically.
Should close #50.
Hey, I am interested in this change. What is the status of it?
I started resolving some of @Antti's and my comments in my fork.
https://github.com/andir/rust-amqp/commits/heartbeat
Feel free to cherry-pick them into this PR.
@andir @MicroJoe @Antti hey all, just wanted to reach out since I haven't moved on this PR for a while.
I actually ended up going with a different AMQP lib for the stuff I was hacking on at the time. I needed futures based async as opposed to threading and such.
@andir sounds like you have forked and have made some progress. That's awesome! Please feel free to open a PR which supersedes this one. I don't think I will have the time to address some of the deeper issues I was concerned with here.
@Antti feel free to close this PR whenever you would like. I'll leave it open until I hear back from @andir on what their plans are for moving forward with the fork.
Thanks all!