<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br><div><div>On 20 Aug 2013, at 16:12, <a href="mailto:reaperman123456789@gmail.com">reaperman123456789@gmail.com</a> wrote:</div><blockquote type="cite"><div dir="ltr">Everything works as expected up to this point. However, when the message TTL of "deferredqueue" is up, I expected the message to reappear again in "livequeue" via the dead-letter exchange of "deferredqueue", but the message is dropped instead.<br>If, however, I ack the message in "livequeue" and publish it to "deferredqueue" using basic_publish, instead of rejecting it, the message <i>does</i> reappear in "livequeue" after the TTL is over, as expected.<br><br>So my question is, is this the normal (intended) behavior, or am I doing something wrong? <br></div></blockquote><div><br></div><div>This is indeed normal/expected behaviour. Dead letter cycles that occur entirely due to expiry are removed, so if the TTL expiry initially occurred in 'livequeue' then when the message later expires in 'deferredqueue' it won't be delivered to 'livequeue' again.</div><br><blockquote type="cite"><div dir="ltr">If this is the normal behavior, is there a way to change it by some exchange/queue/message property, so it will work as I initially planned?</div></blockquote><div><br></div><div>That one I'm not so sure about. One way to handle this would be to use the shovel plugin to handle republishing messages once they expire in the 'deferredqueue', rather than attempting to use TTL + DLX in a cyclic configuration. Set up a third exchange + queue: 'repub-ex' and 'repub-queue'. Configure the DLX for the 'deferredqueue' to publish to the 'repub-ex' exchange. Enable the shovel plugin and set up the 'repub-queue' as the source and the 'live' exchange as the destination. Once messages in the 'deferredqueue' expire, they will be delivered to the 'repub-ex' exchange and routed to the 'repub-queue', at which point the shovel will dequeue and ACK them, then publish them to the 'live' exchange once again. You can configure the shovel plugin to add a custom header to these messages to indicate that they're being republished, if that's something your client application needs to now. </div></div><br></div><div>Cheers,</div><div>Tim</div></body></html>