You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Michele <mi...@finconsgroup.com> on 2015/11/10 09:02:02 UTC

Dead Letter Queue and detect message

Hi everyone,

I just started to work with ActiveMQ, Camel and Enterprise Integration
Pattern.

To ensure reliability I configured my ActiveMQ Broker under Jms Transaction
with redelivery policy inside of message routing with Apache Camel.
Redelivery policy works fine, indeed after 3 attempts with a certain delay,
messages are moved to ActiveMQ.DLQ.

Is there a way to detect when message is moved in DLQ? Is possible to
retrieve a copy of message to send to Aggregator reporting that an error has
occurred related to original message?

Thanks in advance.

Kind Regards.

Michele



--
View this message in context: http://activemq.2283324.n4.nabble.com/Dead-Letter-Queue-and-detect-message-tp4703799.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Dead Letter Queue and detect message

Posted by Michele <mi...@finconsgroup.com>.
Hi Christopher,

first of all thank you for your reply.

I read topics that you suggested and i follow also this link
http://camel.apache.org/activemq.html
Consuming Advisory Messages section configuring ActiveMQ using conntection
pooling and a route inside Camel Context to retrieve AdvisoryMsg

<route id="ActiveMQ.AdvisoryRoute">
			<from
uri="activemq:topic:ActiveMQ.Advisory.MessageDLQd.Queue?mapJmsMessage=false"
/>
			   <convertBodyTo type="java.lang.String"/>
			   <transform>
			      <simple>${in.body}&#13;</simple>
			   </transform>
   			  <log message="AM-DLQ: ${body}" />	
</route>

But no message is logged.
Is there an error in my configuration?

Thanks in advance
Kind Greeting 

Michele



--
View this message in context: http://activemq.2283324.n4.nabble.com/Dead-Letter-Queue-and-detect-message-tp4703799p4703844.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Dead Letter Queue and detect message

Posted by Christopher Shannon <ch...@gmail.com>.
I forgot to mention that the copy of the message will be off by default.
As of 5.12.0, you can enable the advisory message to contain a copy of the
original message by setting the includeBodyForAdvisory property to true on
the destination policy or default policy that is used.  This option is
described here: http://activemq.apache.org/per-destination-policies.html

On Tue, Nov 10, 2015 at 12:31 PM, Christopher Shannon <
christopher.l.shannon@gmail.com> wrote:

> Yes, you can listen to the advisory messages for DLQ'd messages.  An
> advisory will be sent when a message is moved to DLQ and the advisory will
> contain a copy of the message.
>
> The advisory topics to listen on are ActiveMQ.Advisory.MessageDLQd.Queue
> and ActiveMQ.Advisory.MessageDLQd.Topic
>
> Take a look at http://activemq.apache.org/advisory-message.html for more
> info on configuring this.
>
>
>
> On Tue, Nov 10, 2015 at 3:02 AM, Michele <
> michele.mazzilli@finconsgroup.com> wrote:
>
>> Hi everyone,
>>
>> I just started to work with ActiveMQ, Camel and Enterprise Integration
>> Pattern.
>>
>> To ensure reliability I configured my ActiveMQ Broker under Jms
>> Transaction
>> with redelivery policy inside of message routing with Apache Camel.
>> Redelivery policy works fine, indeed after 3 attempts with a certain
>> delay,
>> messages are moved to ActiveMQ.DLQ.
>>
>> Is there a way to detect when message is moved in DLQ? Is possible to
>> retrieve a copy of message to send to Aggregator reporting that an error
>> has
>> occurred related to original message?
>>
>> Thanks in advance.
>>
>> Kind Regards.
>>
>> Michele
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/Dead-Letter-Queue-and-detect-message-tp4703799.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>
>

Re: Dead Letter Queue and detect message

Posted by Christopher Shannon <ch...@gmail.com>.
Yes, you can listen to the advisory messages for DLQ'd messages.  An
advisory will be sent when a message is moved to DLQ and the advisory will
contain a copy of the message.

The advisory topics to listen on are ActiveMQ.Advisory.MessageDLQd.Queue
and ActiveMQ.Advisory.MessageDLQd.Topic

Take a look at http://activemq.apache.org/advisory-message.html for more
info on configuring this.



On Tue, Nov 10, 2015 at 3:02 AM, Michele <mi...@finconsgroup.com>
wrote:

> Hi everyone,
>
> I just started to work with ActiveMQ, Camel and Enterprise Integration
> Pattern.
>
> To ensure reliability I configured my ActiveMQ Broker under Jms Transaction
> with redelivery policy inside of message routing with Apache Camel.
> Redelivery policy works fine, indeed after 3 attempts with a certain delay,
> messages are moved to ActiveMQ.DLQ.
>
> Is there a way to detect when message is moved in DLQ? Is possible to
> retrieve a copy of message to send to Aggregator reporting that an error
> has
> occurred related to original message?
>
> Thanks in advance.
>
> Kind Regards.
>
> Michele
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Dead-Letter-Queue-and-detect-message-tp4703799.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>