hornetq 2.3.0中的重新延迟 - 延迟倍数不受尊重

时间:2013-10-02 11:44:53

标签: hornetq

这是我的设置:

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

此致

1 个答案:

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

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