Erlang/OTP Forums

Author Message

<  RabbitMQ mailing list  ~  publish mandatory/immediate flags

Guest
Posted: Thu Nov 08, 2007 5:22 pm Reply with quote
Guest
We launched w/ a big partner yesterday (AOL) and we're getting hit pretty hard with requests and such and it appears that some requests never get made to our export nodes and the responses don't always make it back from them at times too.
Guest
Posted: Fri Nov 09, 2007 11:05 am Reply with quote
Guest
Matt,

matt wrote:

> I have a question regarding the mandatory and
> immediate flags. One of the basic publish options is as follows:
>
> session.getChannel().basicPublish(session.getTicket(),
> session.getExchange(), key, basicProps, data);
>
> This has mandatory/immediate set to false. Could it be that the new
> server load is causing requests to get dropped at times? What are the
> drawbacks to changing those values to true by using the other call?

With 'mandatory' set to true you will get an asynchronous notification
when a message cannot be routed to any queue, e.g. because there are no
queues bound to the exchange, or the routing key matching fails to
produce a result.

With 'immediate' set to true you will get an asynchronous notification
when a message cannot be sent to a consumer straight away, i.e. if it
would be queued. This can happen there are no consumers registered on a
queue or they are all overloaded.

In the Java client, the notifications are received by the ReturnListener
set with channel.setReturnListener(listener).

The drawback of setting these flags is an increase in latency and drop
in throughput, though not by all that much.


Matthias.

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum