Skip to content

KeyNotFoundException when handling BasicCancelOK message #1012

@LamarLugli

Description

@LamarLugli
Result: RegistrationFailed Already closed: The AMQP operation was interrupted: AMQP close-reason, initiated by Library, code=541, text='Unexpected Exception', classId=0, methodId=0, cause=System.Collections.Generic.KeyNotFoundException: The given key 'amq.ctag-5j-__EPiXaD56-GGM3TCCA' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at RabbitMQ.Client.Impl.ModelBase.HandleBasicCancelOk(String consumerTag)
at RabbitMQ.Client.Framing.Impl.Model.DispatchAsynchronous(IncomingCommand& cmd)
at RabbitMQ.Client.Impl.ModelBase.HandleCommand(IncomingCommand& cmd)
at RabbitMQ.Client.Impl.Session.HandleFrame(InboundFrame& frame)
at RabbitMQ.Client.Framing.Impl.Connection.MainLoopIteration()
at RabbitMQ.Client.Framing.Impl.Connection.MainLoop()

This error happens after a timeout waiting for the response to a BasicCancel. I haven't found the exact conditions to replicate this but looking at the code, the fix to this bug is straight forward.

I will send in a pull request with a fix for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions