Comments (5)
Unfortunately the rabbitmq-c library which the SimpleAmqpClient wraps while
it has the ability to send and receive heartbeat frames, does not have the
infrastructure to support detecting and sending heartbeat frames. While it
would be possible to enable these in SimpleAmqpClient it would require
quite a bit of refactoring to do.
If you feel inclined I would encourage you to develop a patch and submit it
to either rabbitmq-c or SimpleAmqpClient.
On Saturday, August 25, 2012, myheimu wrote:
I use RabbitMQ in a unreliable network. So, the clients may lose
connection with the server sometimes.
I think the "heartbeat" defined in amqp_login could help me.
Could I just modify the #define BROKER_HEARTBEAT in Channel.cpp?
Or I need to modify more source files?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/20.
from simpleamqpclient.
Hi Alan, although this issue is closed I face a similar problem. Any update on a heartbeat patch? Otherwise I'll give it a go.
Thanks
Frans
from simpleamqpclient.
There have been no updates on a patch that I know about. Feel free to give it a shot.
from simpleamqpclient.
Hello! With recently improved support for heartbeats in rabbitmq-c, I wonder if there is any movement toward more official support in SimpleAmqpClient? We've found the #define BROKER_HEARTBEAT 0
in ChannelImpl.cpp-- and discovered that if we change it to a non-zero value, it seems to be mostly working (as far as we can tell).
Is it indeed working? If so, are you planning a version that doesn't require us to modify the source to enable it? If it is not fully working, what are the issues that still need to be addressed?
Thanks!
from simpleamqpclient.
Support for AMQP heartbeats in rabbitmq-c is still what I would consider partial. What I mean by that is: the library will only correctly service AMQP heartbeats when client code calls blocking calls into the library (e.g., amqp_simple_wait_frame
, amqp_basic_publish
). If the client code is off doing other things, heartbeats will not be serviced, and its possible if there's enough of a delay between calls into rabbitmq-c, the broker will incorrectly consider the connection broken and close it.
So simply adding an overload to Channel::Create()
that took a heartbeat parameter would give the same level of support to SimpleAmqpClient.
The reason I haven't already done has to do with the philosophy behind SimpleAmqpClient; which was to make a client that worked consistently no matter how client used it. So if I were to add heartbeat support to SimpleAmqpClient I would want to add it in such a way that the above caveat didn't apply. I think this means that there would need to be a thread associated with each AmqpClient::Channel
object that took care to make sure that rabbitmq-c was being used in such a way that heartbeats were being serviced. Unfortunately due to the design of rabbitmq-c this isn't trivial.
So I guess a bottom line on this is: if you really want support for heartbeats in SimpleAmqpClient, I would be willing to accept a patch that does the trivial thing to get heartbeats working (and has a warning in the API docs indicating what heartbeat support really means). I would prefer a solution that works in all cases, but I don't currently have plans to work on this.
from simpleamqpclient.
Related Issues (20)
- How to quit basicsumemessage when a quit signal coming ?
- when set message HeaderTable, the ReplyTo property Settings have been cleared. HOT 3
- Is This Dead? HOT 3
- Classify Exceptions
- Consumer stops consuming inside Docker container (after some idle period) HOT 1
- fatal error: SimpleAmqpClient/SimpleAmqpClient.h: No such file or directory HOT 1
- Channel::OpenOpts::FromUri results in Access violation reading location 0x0000000000000000. HOT 3
- Version 2.4 compatibility with newer Rabbit servers HOT 4
- Latest NuGet of SimpleAmqpClient HOT 1
- Linking the library on Linux using cmake
- Keep alive for long running connections HOT 3
- App crashes when connection closes HOT 2
- `std::bad_alloc()` when header table is empty
- Handle node failure in RabbitMQ cluster
- Support for Quorum queues
- Bug,Exclusive always true!
- Channel can't open
- Compiling with boost 1.82 generates deprecation warnings
- On the issue of creating channels HOT 7
- Test Mate C++ VSCode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpleamqpclient.