Giter Club home page Giter Club logo

Comments (5)

michaelklishin avatar michaelklishin commented on August 28, 2024

Heartbeats in AMQP 0.9.1 are optional. Do you want to help implementing this functionality?

from bunny.

marcbowes avatar marcbowes commented on August 28, 2024

Here is my use-case:

I have a simple worker that pulls work from a queue, acts on it and then moves onto the next item. I do this using a subscribe block. The code is neat, easy to follow and highly testable.

The problem is that when the underlying connection dies, I don't know about it until the subscribe block hits its timeout. At that point it cancels the subscription, which triggers an exception because the network connection is dead. Worst case here is a 15 min period where the worker is doing nothing.

Heartbeats seemed exactly what I wanted. Is there another way?

from bunny.

michaelklishin avatar michaelklishin commented on August 28, 2024

You can either implement heartbeat support or have a thread that publishes messages that won't be routed anywhere (using default exchange and a random string as routing key). At least RabbitMQ should treat connection activity as heartbeats, regardless of what the client specified as heartbeat interval.

from bunny.

marcbowes avatar marcbowes commented on August 28, 2024

Please leave this issue open. At the very least it'll answer somebody else's question on the matter. At the best, it might attract a pull request.

from bunny.

michaelklishin avatar michaelklishin commented on August 28, 2024

Will be solved after a rewrite

from bunny.

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.