Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel.exchange_declare: Unexpected method frame #36

Open
kopiczko opened this issue Sep 22, 2016 · 1 comment
Open

Channel.exchange_declare: Unexpected method frame #36

kopiczko opened this issue Sep 22, 2016 · 1 comment

Comments

@kopiczko
Copy link

Steps to reproduce:
Notice auto_delete changes.

    channel.exchange_declare(exchange,
                          "fanout",
                          false, // pssive
                          false, // durable
                          false, // auto_delete
                          false, // internal
                          false, // nowait
                          Table::new())
        .unwrap();
    channel.exchange_declare(exchange,
                          "fanout",
                          false, // pssive
                          false, // durable
                          true, // auto_delete
                          false, // internal
                          false, // nowait
                          Table::new())
        .unwrap();

Panics with: AMQP Error: Unexpected method frame: channel.close, expected: exchange.declare-ok.

I'd expect exchange_declare to tell me that exchange is already declared without auto_delete feature.

@Antti
Copy link
Owner

Antti commented Sep 23, 2016

The current implementation is not handling channel errors well. The only expected response from these kind of calls is a corresponding OK method, like exchange.declare-ok, I guess it should also expect channel.close, and return it as an error.

Although, for this particular error it is strange that the server returns an error, because in the protocol specification it says that the server MUST ignore the auto-delete field if the exchange already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants