Closed davidszotten closed 9 years ago
@davidszotten you are right.
We need to handle synchronous
and asynchronous
methods differently.
Synchronous methods are marked in amqp-rabbitmq-0.9.1.json
, all other must be asynchronous.
Probably we should pass over asynchronous methods in the rpc
calls, so they would be handled elsewhere (in the consumers).
There's bunch of methods which require special async handling, most of them are from basic
class:
Async: basic:ack
Async: basic:deliver
Async: basic:get-empty
Async: basic:nack
Async: basic:publish
Async: basic:recover-async
Async: basic:reject
Async: basic:return
Async: connection:blocked
Async: connection:unblocked
The current workaround (until we fix this) would be to declare consumers on a different channels.
@davidszotten I've commited a patch, which should fix this problem, can you test please?
hey, thanks! will give it a whirl. (may take a little while, this is only for a side-project)
works great, thanks!
trying to run what is mostly the
consumer.rs
example. however, if i bind to a queue which already has messages, i get an errorErr(Protocol("Unexpected method frame: basic.deliver, expected: basic.consume-ok"))
i think the issue is the second basic_consume, which expects the very next message from the server to be the
consume-ok
, but since we've already started consuming, the server is already sending us messages