Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heartbeat flexibility to support ActiveMQ #78

Merged
merged 6 commits into from
Jan 8, 2016

Conversation

nigelsim
Copy link
Contributor

@nigelsim nigelsim commented Jan 7, 2016

I was not able to make stomp.py work with ActiveMQ when the heartbeat was activate because stomp.py would fire a heartbeat timeout and disconnect. Some of the issue seemed to be that by default ActiveMQ backs off the first heartbeat by the same as the heartbeat timeout, effectively skipping the first beat. Also, the 2 second grace on the receive heartbeat didn't always seem sufficient. In ActiveMQ they suggest a 50% grace, which I've implemented here.

Also, I removed diff_heartbeat as it was identical logic to diff_receive.

Finally, I put some guard code around the heartbeat sending and receiving because if I just was to enable client heartbeats, and have the server heartbeat at 0 then the code as it stood would timeout immediately.

@jasonrbriggs jasonrbriggs merged commit cc4d9c9 into jasonrbriggs:master Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants