activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <>
Subject Re: Iterate over non-persistent activemq expired messages in ActiveMQ.Advisory.Expired.Queue
Date Mon, 26 Sep 2016 13:08:03 GMT
"By default, ActiveMQ will not place undeliverable non-persistent messages
on the dead-letter queue."  So unless you enable the processNonPersistent
option described in that page, you can't.

If you do enable that option, here's an example of consuming the advisory
That consumer just gets the original destination, but you can instead
access the originalMessageId property as documented here:


On Sep 21, 2016 11:16 PM, "chetansistla" <> wrote:

> Hi,
> Iam building an application on activemq where iam sending a message from
> producer where my delivery mode is NON_PERSISTENT (*iam not dealing with
> PERSISTENT delivery mode and i know it will be stored in DLQ-which is not
> my
> design*)and have set a time to live for the message using
> producer.setTimeToLive(2000).As the functionality says the message will
> expire in 2 seconds.
> I see that the expired messages are enqueued in the
> *ActiveMQ.Advisory.Expired.Queue* in the topic section of activeMQ admin
> console i.e. *http://localhost:8161/admin/topics.jsp.
> *
> My question is how do i *iterate* over the *ActiveMQ.Advisory.Expired.
> Queue*
> so that i can access the *MessageID* of the expired message.Any code
> example
> would be great.
> --
> View this message in context: http://activemq.2283324.n4.
> messages-in-ActiveMQ-Advisory-Expired-Queue-tp4716777.html
> Sent from the ActiveMQ - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message