3.      By setting TTL, Durable, Redelivered, what behavior does the system
exhibit?

>
>> TTL, will cause the message to be dequeued and discarded if the TTL has
>> been reached.
>>
>> Durable will cause the message to be written to disk, if the queue it is
>> being routed to is marked as durable.
>>
>> Redelivered is set when a consumer read a message, and then rejects it.
>> The flag is an indication that the
>> message delivery is being re-attempted for the next consumer trying to
>> consume it
>>
>>
> Redelivered will also be set if a message was delivered to a client but who
> has not had time to ack it due to,
>

Rather than saying 'not had time to ack', it's more correct to say 'was
unable to ack'.


> 1) Broker failover
> 2) Client error.
>

In addition to the above 2 cases, a message will be marked redelivered if,

3) A consumer 'releases' a message [*] .
4) A sender had to replay (resend) a message due to failover.

[*] A consumer could release a message for a variety of reasons. By
releasing a message the application notifies the broker that it is no longer
interested in the message. An application cannot release a message that has
already been acknowledged.


> I am not sure if rejected messages are not redelivered. Alan can you please
> confirm.
> A bit later I will actually test this out and let you know.
>
>>
>>
I verified that rejected messages are *not* redelivered. Instead they are
just dropped from the queue.
Therefore if I an application receives a message marked "redelivered" then
the application can safely assume that it wasn't rejected  by another
consumer.
The C++ message API clearly states that under the reject method as well.

Reply via email to