这是我的设置:
<address-settings>
<!--default for catch all-->
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
<!-- 240000 = 4 min-->
<redelivery-delay>30000</redelivery-delay>
<!--<expiry-delay></expiry-delay>-->
<redelivery-delay-multiplier>20.0</redelivery-delay-multiplier>
<max-delivery-attempts>5</max-delivery-attempts>
<max-size-bytes>104857600</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy>
</address-setting>
</address-settings>
我在日志中看到4分钟的延迟得到了尊重,但它并不尊重设置重新传递延迟乘数。有谁知道我做错了什么?
此致
答案 0 :(得分:1)
您必须设置max-redelivery-delay才能生效,因为max-redelivery-delay的默认值是redelivery-delay
<address-settings>
<!--default for catch all-->
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
<!-- 240000 = 4 min-->
<redelivery-delay>24000</redelivery-delay>
<!-- 2400000 = 40 min .. or whatever you like -->
**<max-redelivery-delay>2400000</max-redelivery-delay>**
<redelivery-delay-multiplier>20.0</redelivery-delay-multiplier>
<max-delivery-attempts>5</max-delivery-attempts>
<max-size-bytes>104857600</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy>
</address-setting>
</address-settings>
我正在通过此问题跟踪器在未来版本(2.4.0+)上更改此行为: