当前位置:网站首页>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>
边栏推荐
- mysql中的数据结果排名
- Leetcode组合总和+剪枝
- The operation cannot be completed because a folder or file in it is already open in another program
- Neural network learning (1) Introduction
- Network principle (2) -- network development
- [STL]list模拟实现
- canvas很多圆圈组成的文本js特效
- How to connect tdengine with idea database tool?
- 【npm】 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
- Shell script
猜你喜欢

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

对称式加密与非对称式加密的对比

图解LeetCode——919. 完全二叉树插入器(难度:中等)

How to write the code of wechat applet implementation tab

JS touch screen game source code ice and snow journey
![[deep learning] overview | the latest progress of deep learning](/img/b9/6117862397dcda4d555c819e913c9b.png)
[deep learning] overview | the latest progress of deep learning

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

The simplest sklearn environment configuration tutorial in the whole network (100% success)

Comments on specific applications of camera

Common tool classes under JUC package
随机推荐
activemq--可持久化机制之JDBC的journal
Sticky.js page scrolling div fixed position plug-in
Django4.0 + web + MySQL 5.7 realize simple login operation
28. Slot
What version of Oracle10g single instance database is better to upgrade to? Ask for suggestions
ActiveMQ -- leveldb of persistence mechanism
c语言中的六个存储类型:auto register static extern const volatile
activemq--可持久化机制之AMQ
Canvas dynamic picture avatar shaking JS special effect
Probe into Druid query timeout configuration → who is the querytimeout of datasource and jdbctemplate effective?
The hole of scroll view in uniapp
Algorithm --- flip digit (kotlin)
Wechat applet obtains the data of ---- onenet and controls the on-board LED of STM32
[BUUCTF-n1book][第二章 web进阶]SSRF Training
activemq--死信队列
js触屏小游戏源码冰雪之旅
Illustration leetcode - 919. Complete binary tree inserter (difficulty: medium)
Arcgis10.2 installation tutorial
Labview--- signal generator
51 single chip microcomputer controls nixie tube display