8000 Channel does not handle server-initiated closes. · Issue #70 · jakubkulhan/bunny · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Channel does not handle server-initiated closes. #70
Open
@jmalloc

Description

@jmalloc

Channel::onFrameReceived() has no path that handles an inbound MethodChannelCloseFrame.

This means that if the server closes a channel, we get the generic exception message Message: Unhandled method frame Bunny\Protocol\MethodChannelCloseFrame., thrown from https://github.com/jakubkulhan/bunny/blob/master/src/Bunny/Channel.php#L623.

It would be great if the exception thrown here included the AMQP error information from the close frame, such as the error code constant and the error message. I'm not sure if it's appropriate to add this to ChannelException, or whether a new exception type should be added.

Aside from providing more information to the developer I'd like to add that there are programatic use cases for having access to the error code. For example, being able to check if a resource-locked code is returned when attempting to start an exclusive consumer.

I'm not very familiar with Bunny yet, so please forgive me if I've missed something here. I can put together a PR if you could provide some direction as to what you think should be changed :)

/cc @act28

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0