1

这是我的设置:

<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 分钟,但它不尊重设置重新交付延迟乘数。有谁知道我做错了什么?

问候

4

1 回答 1

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+)上更改此行为:

https://issues.jboss.org/browse/HORNETQ-1263

于 2013-10-02T12:09:38.597 回答