[rabbitmq-discuss] Messages are read by consumer befor than sender get confirmation

Simon MacMullen simon at rabbitmq.com
Wed Jun 18 16:22:13 BST 2014


On 18/06/14 09:12, Haster wrote:
> Hi folks,
>
> I have a sender, that sends messages to some exchange EX and after that
> waits confirmation from RabbitMQ
> (I use confirmation mode + mandatory bit)
> And there is a consumer that reads messages from queue QU that is bind to
> EX.
>
> And I have a situation then consumer get messages before sender receive
> confirmation from RabbitMQ.
>
> can I change this behavior?

No, that's an optimisation. When the message is persistent it can be 
delivered to the consumer before it's been written to disk, and thus 
before the publisher receives a confirm.

> And one more problem that I have...
> I wait confirmation from RabbitMQ for some time and I often  get timeout,
> but messages were published successfully (so timeout happend during I'm
> waiting for ACK or RETURN method).
> So can I change this situation and delete message from queue if I receive
> timeout?
>
> I think no, but maybe =)

I'm afraid not. Those timeouts are presumably implemented in your 
client, they're not a protocol-level thing. So the server never knows 
they've fired.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list