[rabbitmq-discuss] configuring rabbit-mq server to send back a publisher confirm after N messages.
francesco at rabbitmq.com
Tue Jul 24 10:17:27 BST 2012
At Mon, 23 Jul 2012 12:11:37 -0700 (PDT),
rohit prasad wrote:
> I am using Publisher-confirms.
> Is there any way to tell Rabbit server to send a pub-confirm after N messages.
> If this is possible, then in my rabbit client , I can wait for a pub-confirm
> after sending N messages, and be sure that Rabbit server will send me a
> confirm (ack or nack) pretty soon. Otherwise the waiting time for the
> pub-confirm becomes kind of undeterministic, we keep waiting till Rabbit feels
> like sending a confirmation. Is this configurable in any way? Or Do you
> suggest some other way to reduce the wait time for publisher-confirm acks?
I'm not sure I understand what you are saying (especially the part about
determinism), but the problem here seems that you don't want to wait for a
confirm for each message you publish. This is easily done: you can have a
listener waiting for confirms while you publish messages in parallel. See the
example in the blog post that introduced confirms:
http://www.rabbitmq.com/blog/2011/02/10/introducing-publisher-confirms/ , or
this Java example that waits for confirms for multiple publishes:
Francesco * Often in error, never in doubt
More information about the rabbitmq-discuss