Logging DLQ activity

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Logging DLQ activity

Frizz-2
I'd like to get notified each time a messages ends up in a DLQ.

My preferred solution would be to use the existing ELK stack and write a
filter in Kibana.
(have the AMQ logfiles sent via Logstash to Kibana)

Question is: How can I configure AMQ to write DLQ related messages in the
logfiles? What messages do I have to look for?
Reply | Threaded
Open this post in threaded view
|

Re: Logging DLQ activity

thall
If you are willing to do some light development you can put in some specific code to do just that logging, or you could enable the logging plugin but you will get more than what you want.

take a look at http://activemq.apache.org/developing-plugins.html <http://activemq.apache.org/developing-plugins.html>
the logging plugin code is at: https://github.com/apache/activemq/blob/master/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java <https://github.com/apache/activemq/blob/master/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java>

Thanks,
Tom


> On Jul 17, 2018, at 1:20 AM, Frizz <[hidden email]> wrote:
>
> I'd like to get notified each time a messages ends up in a DLQ.
>
> My preferred solution would be to use the existing ELK stack and write a
> filter in Kibana.
> (have the AMQ logfiles sent via Logstash to Kibana)
>
> Question is: How can I configure AMQ to write DLQ related messages in the
> logfiles? What messages do I have to look for?

Reply | Threaded
Open this post in threaded view
|

Re: Logging DLQ activity

Frizz-2
Yes, this is what I've ended up with (Broker Plugin). Unfortunately it does
not work reliably for sendToDeadLetterQueue() (-> some messages are moved
to DLQ but sendToDeadLetterQueue is not called). So I used send() instead
-> this works.

Two notes:
1) I am not 100% happy to hook into send() because I in doing so have to
check *ALL* messages.
2) It still would be nice if AMQ would offer the possibility to log when a
messages are moved into DLQ. I mean, there's already tons of log
information - why not also this (for many really useful) information?


On Tue, Jul 17, 2018 at 5:52 PM, Tom Hall <[hidden email]> wrote:

> If you are willing to do some light development you can put in some
> specific code to do just that logging, or you could enable the logging
> plugin but you will get more than what you want.
>
> take a look at http://activemq.apache.org/developing-plugins.html <
> http://activemq.apache.org/developing-plugins.html>
> the logging plugin code is at: https://github.com/apache/
> activemq/blob/master/activemq-broker/src/main/java/org/
> apache/activemq/broker/util/LoggingBrokerPlugin.java <
> https://github.com/apache/activemq/blob/master/activemq-
> broker/src/main/java/org/apache/activemq/broker/util/
> LoggingBrokerPlugin.java>
>
> Thanks,
> Tom
>
>
> > On Jul 17, 2018, at 1:20 AM, Frizz <[hidden email]>
> wrote:
> >
> > I'd like to get notified each time a messages ends up in a DLQ.
> >
> > My preferred solution would be to use the existing ELK stack and write a
> > filter in Kibana.
> > (have the AMQ logfiles sent via Logstash to Kibana)
> >
> > Question is: How can I configure AMQ to write DLQ related messages in the
> > logfiles? What messages do I have to look for?
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Logging DLQ activity

Tim Bain
Are you able to reliably reproduce the behavior where a message is sent to
the DLQ but sendToDeadLetterQueue() is not called? If you are, can you
share that setup? With the help of a debugger or a profiler we might be
able to figure out why it's inconsistent, and how we could tie in to
something that would let us capture the remaining fraction of the messages
so you get all of them logged without having to tie into send().

Tim

On Thu, Jul 26, 2018, 12:20 AM Frizz <[hidden email]>
wrote:

> Yes, this is what I've ended up with (Broker Plugin). Unfortunately it does
> not work reliably for sendToDeadLetterQueue() (-> some messages are moved
> to DLQ but sendToDeadLetterQueue is not called). So I used send() instead
> -> this works.
>
> Two notes:
> 1) I am not 100% happy to hook into send() because I in doing so have to
> check *ALL* messages.
> 2) It still would be nice if AMQ would offer the possibility to log when a
> messages are moved into DLQ. I mean, there's already tons of log
> information - why not also this (for many really useful) information?
>
>
> On Tue, Jul 17, 2018 at 5:52 PM, Tom Hall <[hidden email]> wrote:
>
> > If you are willing to do some light development you can put in some
> > specific code to do just that logging, or you could enable the logging
> > plugin but you will get more than what you want.
> >
> > take a look at http://activemq.apache.org/developing-plugins.html <
> > http://activemq.apache.org/developing-plugins.html>
> > the logging plugin code is at: https://github.com/apache/
> > activemq/blob/master/activemq-broker/src/main/java/org/
> > apache/activemq/broker/util/LoggingBrokerPlugin.java <
> > https://github.com/apache/activemq/blob/master/activemq-
> > broker/src/main/java/org/apache/activemq/broker/util/
> > LoggingBrokerPlugin.java>
> >
> > Thanks,
> > Tom
> >
> >
> > > On Jul 17, 2018, at 1:20 AM, Frizz <[hidden email]
> .INVALID>
> > wrote:
> > >
> > > I'd like to get notified each time a messages ends up in a DLQ.
> > >
> > > My preferred solution would be to use the existing ELK stack and write
> a
> > > filter in Kibana.
> > > (have the AMQ logfiles sent via Logstash to Kibana)
> > >
> > > Question is: How can I configure AMQ to write DLQ related messages in
> the
> > > logfiles? What messages do I have to look for?
> >
> >
>