GithubHelp home page GithubHelp logo

el-cheapo heartbeat handling? about rabbitmq-c HOT 2 CLOSED

alanxz avatar alanxz commented on September 27, 2024
el-cheapo heartbeat handling?

from rabbitmq-c.

Comments (2)

alanxz avatar alanxz commented on September 27, 2024

My initial reaction is: I'm not excited about putting a half-baked support for something like this. My worry is users will read "Partial Support for AMQP Heartbeats" and read it as "Supports AMQP Heartbeats", then I'm inundated with people asking why heartbeats don't work for them.

That said, I'm seeing more and more desire for such a feature in the library. So in the narrow use case where all you're doing is sitting waiting for a message to be delivered to a consumer, I see how this could be immensely useful, especially if someone is waiting potentially a long time.

My thoughts on design is that I wouldn't put it in amqp_simple_wait_frame() at least not initially. I would add a new function amqp_basic_consume_message which would have one purpose: which is to block waiting on a message from the broker. If it got a heartbeat frame, it would respond to the broker appropriately and continue waiting. My reasons behind this are several:

  • The library needs a "consume a message" interface
  • Given this is only partial support, I want those who want to roll their own handling of heartbeating to do so using amqp_simple_wait_frame()
  • I want to be explicit as to when heartbeats are supported in the library.

So I say please go ahead and hack away. Submit a pull-request when you think you have something that could be included in the library.

from rabbitmq-c.

alanxz avatar alanxz commented on September 27, 2024

This has been added in #109

from rabbitmq-c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.