[rabbitmq-discuss] Pika and Channel.Flow

Matthias Radestock matthias at rabbitmq.com
Tue May 25 19:58:49 BST 2010


Allan,

allan bailey wrote:
> Are you suggesting that basic_publish should return something?  From my 
> brief reading of the protocol it doesn't return anything.

The basic.publish AMQP command has no response. That doesn't mean the 
corresponding client library method cannot return something or throw an 
exception.

> In my code I'm in a tight look just sending messages via basic_publish. 
>  At no point does basic_publish notice the channel.flow state change.

That's a problem with the library.

Once a client library has seen a channel.flow{active=false}, it should 
a) return channel.flow-ok{active=false}, and b) prevent any further 
basic.publishes to the channel until a channel.flow{active=true} has 
been received and replied to.

What exactly the library should do when refusing to send a basic.publish 
is up to the library designer... we have seen all of the following in 
the wild:

- block the thread that is trying to send the basic.publish until flow 
can resume (that's what the RabbitMQ Java and .net clients do)

- throw an exception to the initiator of the basic.publish

- silently drop the basic.publish


Regards,

Matthias.



More information about the rabbitmq-discuss mailing list