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 support for AMQP #189
Comments
As far as I understand, just setting that option to some configurable value would not be enough, syslog-ng would need to send heartbeat packets too, if there's no other traffic. Doing that is a bit more involved than adding a configurable parameter. Am I seeing it correctly? Or is it enough to set that argument, and receive heartbeat frames from the server, without sending any ourselves? |
I'm not familiar with C/C++ implementation of AMQP and higher-level languages do this for you. So it really is hard to tell. One thing, though. You must not block indefinitely and must keep polling. Otherwise, you might miss communication from MQ server which ultimately(?) leads to being kicked out and connection terminated. |
Actually, I believe server itself doesn't send any heartbeats and it's up to client to send those. |
https://stackoverflow.com/questions/21020945/how-to-enable-server-side-heartbeat-for-rabbitmq <<< not exactly reliable source, but I guess it makes sense. If server doesn't hear from client in defined/agreed heartbeat, then it proclaims client to be dead and will close connection. |
Mmmhm. That's a bit harder to implement, but I have an idea: using ivykis timers might just get the job done in a neat way. |
@dnsjts could you look at this? |
As a hint, here is how I created a working environment for development. With better understanding of rabbitmq, there is probably a simpler way. Please share if you know one!
This will start a web service on http://localhost:15672
To read logs, one can use the python snippet provided in the rabbitmq tutorial:
|
Please,
either enable or make configurable heartbeat in mod AMQP. This should be configurable and/or enabled.
https://github.com/balabit/syslog-ng-3.5/blob/master/modules/afamqp/afamqp.c#L334
https://github.com/omniti-labs/Net--RabbitMQ/blob/master/amqp.h#L234
Thank you.
[Edited by @Kokan]
As
rabbitmq
already supports heartbeat, from syslog-ng side it only has to make it configurable. For details seeamqp_login
function.The text was updated successfully, but these errors were encountered: