Skip to content

Scope queue/exchange/binding/consumer tracking [used by connection recovery] per connection (Bunny::Session) #704

@michaelklishin

Description

@michaelklishin

We have done this in the Java client back in 2014, after about a year of experience with the original recovery implementation very much copied from Bunny (rabbitmq/rabbitmq-java-client@396bc54, see c.r.impl.recovery.AutorecoveringConnection and c.r.impl.recovery.AutorecoveringChannel in modern versions).

There are several reasons for doing this, for example: when N channels use the same queue and the queue is deleted on one of them, a recovery of all channels at once will resurrect the deleted queue, which, which violates an obvious user expectation.

Another reason is the risk of a channel exception during recovery, which can result in channel deletion from connection state, and the loss of all registered
consumers with it. In other clients this particular problem has not been observed in the wild
but it large falls into the same category.

Keeping track of the topology for recovery purposes in Bunny::Session, just like we already do
in at least two other clients, would eliminate an entire class of problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions