简体   繁体   English

我们如何分析 Activemq 死信队列中的消息

[英]How do we analyze messages in Dead Letter queue for Activemq

The Broker then takes the message and sends it to a Dead Letter Queue so that it can be analyzed later on.然后 Broker 接收消息并将其发送到死信队列,以便稍后对其进行分析。

These are the quotes from apache activemq article.这些是来自 apache activemq 文章的引用。 My strategy is also the same.我的策略也是一样。 I want to analyze the messages in dead letter queue later.我想稍后分析死信队列中的消息。 How can I do that?我怎样才能做到这一点?

The Dead Letter Queue (DLQ) is just like any other Queue in that you can subscribe to it and consume the messages using a JMS MessageConsumer or QueueBrowser.死信队列 (DLQ) 就像任何其他队列一样,您可以订阅它并使用 JMS MessageConsumer 或 QueueBrowser 使用消息。 With that you can take a message from the Queue and inspect it as you would any other message.有了它,您可以从队列中获取消息并像检查任何其他消息一样检查它。 The current ActiveMQ client will usually add a poison cause to the message store in the message property "dlqDeliveryFailureCause" which can indicate what caused the message to be discarded.当前的 ActiveMQ 客户端通常会在消息属性“dlqDeliveryFailureCause”中向消息存储添加中毒原因,这可以指示导致消息被丢弃的原因。

Of course if you are looking in the WebConsole you can view the messages in the DLQ that way as well and inspect the properties of the message.当然,如果您正在查看 WebConsole,您也可以通过这种方式查看 DLQ 中的消息并检查消息的属性。

Essentially the whys and hows of the analysis are up to you, the broker gives the means to retrieve the messages, how you make sense of them is up to you.基本上分析的原因和方法取决于您,经纪人提供检索消息的方法,您如何理解它们取决于您。

I made a simple open source command line tool, called A , to manually deal with DLQ messages among other things.我制作了一个简单的开源命令行工具,称为 A ,用于手动处理 DLQ 消息等。

This command will write browse the content of one message to a file for further inspection.此命令会将浏览一条消息的内容写入文件以供进一步检查。

a -b tcp://example.org:61616" -c 1 -o msg-data.txt ActiveMQ.DLQ

A common way to deal with DLQ messages is to be able to handle them from some admin view of the system.处理 DLQ 消息的常用方法是能够从系统的某些管理视图处理它们。 Like inspect content, correlate to error message with options to retry or discard the message.像检查内容一样,将错误消息与重试或丢弃消息的选项相关联。 That requires some dev.这需要一些开发人员。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将activemq队列配置为不对过期消息使用默认的死信队列 - How can I configure an activemq queue to not use the default dead letter queue for expired messages ActiveMQ:死信队列保持我的消息顺序 - ActiveMQ : dead letter queue keeps my messages order 未创建ActiveMQ死信队列 - ActiveMQ Dead Letter Queue isn't created 在ActiveMQ的死信队列中访问消息,并在使用后重新传递到Web服务或套接字 - Accessing messages in Dead letter Queue of ActiveMQ and redeliver to webservice or socket after consumption ActiveMQ代理关闭。 生产者异步发送消息。 如何对生产者发送的邮件执行重新传递? 如何使用死信队列 - ActiveMQ Broker down. Producer sending messages asynchronously. How to perform re delivery for messages send by Producer? How to use dead letter queue Spring JMS Activemq - 设置死信队列名称(DLQ) - Spring JMS Activemq - set dead letter queue-name (DLQ) 如何将部分 Kafka 消息放入死信队列 - How do I put part of Kafka message in Dead Letter Queue 如何清空Actor死信队列 - How to empty Actor dead letter queue Kafka 死信队列,仅用于具有相同密钥的消息 - Kafka dead letter queue, for messages with same key only 抛出异常时消息不会进入死信队列 - Messages not going to dead-letter queue on throwing exception
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM