[rabbitmq-discuss] Trouble with confirms
Tom Anderson
tom.anderson at timgroup.com
Mon Jul 29 17:25:36 BST 2013
On 29/07/13 13:40, Matthias Radestock wrote:
> On 29/07/13 13:30, Tom Anderson wrote:
>> On 26/07/13 23:32, Matthias Radestock wrote:
>>> On 26/07/13 18:29, Tom Anderson wrote:
>>>> "The broker will confirm messages once:
>>>> [...]
>>>> * a transient message has reached all its queues
>>>> [...]
>>>> So, if i send a persistent message (delivery mode = 2) to a
>>>> non-durable
>>>> exchange which routes to a non-durable queue, then i will only get a
>>>> confirmation once the message has been consumed from that queue,
>>>> right?
>>>
>>> Wrong. The behaviour is described in the snippet you quoted above,
>>> i.e. the message gets confirmed once it has reached all the queues it
>>> was routed to.
>>
>> Okay. Just to clarify: the bit of the snippet i quoted that you quoted
>> says "a transient message". I understood that as specifically referring
>> to transient messages, not persistent ones, ie those sent with delivery
>> mode 1 rather than 2. I was asking about persistent messages. Are you
>> telling me that the behaviour for persistent messages is actually the
>> same as that specified for transient messages?
>
> Messages persistence requires the combination of
> 1) delivery_mode = 2
> 2) routing to a durable queue
>
> Condition #2 is not met in your case, so the message is not persisted,
> i.e. it is treated as a transient message.
Aha. I didn't realise, that, thanks.
What i'm looking for is a way to get some sort of feedback at the sender
when a message has been acknowledged by the consumer. Given that
transient messages are confirmed as soon as the message has reached the
queue, and persistent messages are confirmed as soon as they are written
to disk, am i right in concluding that there is no way to do this with
confirms? Is there any other mechanism in RabbitMQ that might let me do
this?
My real goal here is to write a test for an application of ours, to
assert that it is only acknowledging messages after it has successfully
processed them, and not immediately on receipt. If anyone has any
thoughts on how i might be able to do that, i would be very excited to
hear them!
Thanks,
tom
--
Tom Anderson | Developer | +44 20 7826 4312 | timgroup.com
<http://timgroup.com/>
STATEMENT OF CONFIDENTIALITY: The information contained in this
electronic message and any attachments to this message are intended for
the exclusive use of the addressee(s) and may contain confidential or
privileged information. If you are not the intended recipient, please
notify Tom Anderson at TIM Group at tom.anderson at timgroup.com and
destroy all copies of this message and any attachments.
TIM Group is the trading name for YouDevise Limited. YouDevise Limited
is registered in England, No. 3331176. Registered office: 3 Copthall
Avenue, London, EC2R 7BH.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130729/7965ed17/attachment.htm>
More information about the rabbitmq-discuss
mailing list