rust-amqp icon indicating copy to clipboard operation
rust-amqp copied to clipboard

Implement connection heartbeating.

Open thedodd opened this issue 7 years ago • 3 comments

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 0 disables 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 allowing Session to be Sync so that we can follow the "channel per thread" more practically.

Should close #50.

thedodd avatar Feb 01 '18 05:02 thedodd

Hey, I am interested in this change. What is the status of it?

gagath avatar Mar 23 '18 14:03 gagath

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 avatar Jul 20 '18 14:07 andir

@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!

thedodd avatar Aug 03 '18 15:08 thedodd