当前位置:网站首页>ActiveMQ -- dead letter queue
ActiveMQ -- dead letter queue
2022-07-25 09:18:00 【Why don't you laugh】
Dead letter queue
Dead letter queue :Dead Letter Queue
After a message is sent repeatedly many times ( Default retransmission 6 Time ,redeliveryCounter=6), Will be moved to the dead letter queue . Developers can use this queue View error messages , To intervene artificially .

Used in general production environment mq When we design two queues :
1. Core business queue : Handle normal business logic
2. Dead letter queue : Handling exception information
To configure
SharedDeadLetterStrategy: Share dead letter queue policy
Will all DeadLetter Saved in a shared queue , This is a activemq Default policy . The shared queue defaults to “ActiveMQ.DLQ”, Can pass “deadLetterQueue” Property to set .
<deadLetterStrategy>
<sharedDeadLetterStrategy deadLetterQueue="DLQ-QUEUE" />
</deadLetterStrategy>
IndividualDeadLetterStrategy: Independent dead letter queue strategy
hold DeadLetter Put them into their respective dead letter queues .
about queue for : The prefix of dead letter channel is... By default “ActiveMQ.DLQ.Queue”
about topic for : The prefix of dead letter channel is... By default “ActiveMQ.DLQ.Topic”
Like queues order, Then its corresponding dead letter channel is “ActiveMQ.DLQ.Queue.Order”
We use "queuePrefix","topicPrefix" To specify the above prefix
By default ,queue and topic,broker Will use queue To preserve DeadLetter, That is, the dead letter channel is usually Queue, You can also specify Topic:
<policyEntry queue="order">
<deadLetterStrategy>
<individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="false" />
</deadLetterStrategy>
</policyEntry>
Queue Order What happened in DeadLetter Save in DLQ.Order in , But in this case DLQ.Order by topic.
useQueueForQueueMessages: To indicate whether or not to topic Of DeadLetter Save in Queue in . Default true
Automatically delete expired messages
Sometimes you need to delete expired messages without sending them to the dead letter queue ."processExpired" Indicates whether to put expired messages in the dead letter queue , Default true
<policyEntry queue=">">
<deadLetterStrategy>
<sharedDeadLetterStrategy processExpired="false" />
</deadLetterStrategy>
</policyEntry>
Store non persistent messages to the dead letter queue
By default ,mq Will not put non persistent toxic messages in the dead letter queue .
"processNonPersistent" Indicates whether to put non persistent messages into the dead letter queue , Default false, Don't put
<!-- queue=">" Represents all valid -->
<policyEntry queue=">">
<deadLetterStrategy>
<sharedDeadLetterStrategy processNonPersistent="true" />
</deadLetterStrategy>
</policyEntry>
边栏推荐
- CIR industrial automation radar
- Sort out Huawei ap-3010dn_ V2 configuration create WiFi
- 防抖与节流
- 【npm】 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
- activemq--可持久化机制之KahaDB
- JS pop-up City filtering component matches mobile terminal
- Robot jumping problem
- Nacos启动报错Unable to start web server
- activemq--消息重试机制
- Dark horse programmer JDBC
猜你喜欢

What is steel grating?

Unity ugui interaction (new ideas)

Guangzhou has carried out in-depth "100 day action" to check the safety of self built commercial houses, and more than 2 million houses have been checked in two months

The garbage classification data set used in the excellent Yolo target detection training is shared - about 3000 labeled

Sticky.js page scrolling div fixed position plug-in

ActiveMQ -- JDBC code of persistent mechanism

API健康状态自检

activemq--可持久化机制之JDBC代码

Oracle10g单实例数据库升级到哪个版本好,求建议
![[BUUCTF-n1book][第二章 web进阶]SSRF Training](/img/29/8894d04b27e0e73c4458c27bd9b935.png)
[BUUCTF-n1book][第二章 web进阶]SSRF Training
随机推荐
[SCADA case] myscada helps VIB company realize the modernization and upgrading of production line
This ten-year content industry infrastructure company is actually an invisible Web3 pioneer
Canvas text JS special effect composed of many circles
Silicon Valley classroom lesson 12 - official account on demand course and live broadcast management module
Write two channel (stereo) immediately Wav file
防抖与节流
Kubedm introduction
flink sql怎么持久化?
The development of art NFT
分布式一致性协议之Raft
How to use pixi.js to make simple Parkour games
Software examination system architecture designer concise tutorial | software life cycle
Solve the syntaxerror: unexpected end of JSON input
2022-7-14 JMeter pressure test
Neural network learning (1) Introduction
js触屏小游戏源码冰雪之旅
全网最简约的sklearn环境配置教程(百分百成功)
activemq--消息重试机制
[NPM] the "NPM" item cannot be recognized as the name of cmdlets, functions, script files or runnable programs. Please check the spelling of the name. If the path is included, make sure the path is co
实现简单的RESTful API服务器