Git Product home page Git Product logo

Comments (5)

jameskeane avatar jameskeane commented on May 21, 2024

I have done some more investigation, it seems this problem, happens for all errors. And has existed since at least 2.6.

RabbitMQ sends a channel.close message, but it doesn't actually close the damn channel.

I have created an example of this here: https://gist.github.com/9fe5507c2e7169bb93b2

from rabbitmq-server.

jameskeane avatar jameskeane commented on May 21, 2024

This is a bug in all of the client libraries I have used.

When a server sends a channel.close, the client is expected to acknowledge with a channel.closeOk. If the client does this the channel is properly released.

from rabbitmq-server.

thejuan avatar thejuan commented on May 21, 2024

My reading of AMQP Spec is that no CloseOk is required when a channel is closed with an exception.
I would suggest this a bug in the server code?

https://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf
2.2.3 No Confirmations
4.5 Channel Closure
The server will consider a channel closed when any of these happen:

  1. Either peer closes the channel or the parent connection using a Close/Close-Ok handshake.
  2. Either peer raises an exception on the channel or the parent connection

from rabbitmq-server.

michaelklishin avatar michaelklishin commented on May 21, 2024

Since this thread is from 2012, keep a couple of things in mind:

  • Things could have changed since then.
  • The AMQP 0-9-1 spec has known issues, inconsistencies and statements open to interpretation. Team RabbitMQ has an entire errata document. It also has features that 10 year later can confidently be considered poorly thought out and in a couple of places RabbitMQ deviates to do what's more user-friendly.
  • If a particular behaviour is demonstrated by most popular client libraries, including those our team maintains, it is extremely unlikely that it's going to change by now. If something is a truly annoying behaviour, it has been reported plenty of times in the ~ 10 years since the 0-9-1 spec was last revised.

RabbitMQ sends clients a channel.close-ok in response to a channel.close, so why would clients not be required send a response when RabbitMQ initiates a close?

Anyhow, a quick glance at rabbit_channel/rabbit_reader, Java client and Bunny suggest that

  • A channel.close-ok is still required.
  • Java client and Bunny sent channel.close-ok as expected.
  • In Java client it has been the case since at least Jan 2011 (very likely way earlier, it's just as early as things go for ChannelN in the current codebase)

So the reporter probably hasn't used one of the clients maintained by our team. node-amqp is known to be a terrible, buggy abandonware and we have been recommending avoiding it for years.
I cannot name a client that has caused more head scratching and false RabbitMQ bug accusations than node-amqp. Use amqp.node instead.

from rabbitmq-server.

michaelklishin avatar michaelklishin commented on May 21, 2024

Any further comments about how the spec should be interpreted belong to the mailing list.

from rabbitmq-server.

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.