設置ActiveMQ的Redelivery Policy

 

Redelivery Policy

Detail on when messages are redelivered to a client can be found in the Message Redelivery and DLQ Handling section.

You can configure the RedeliveryPolicy on your ActiveMQConnectionFactory or ActiveMQConnection to customize exactly how you want the redelivery to work.

You can use Java code, Spring or the Connection Configuration URI to customise this.

Available Properties

Property

Default Value

Description

collisionAvoidanceFactor

0.15

The percentage of range of collision avoidance if enabled

maximumRedeliveries

6

Sets the maximum number of times a message will be redelivered before it is considered a poisoned pill and returned to the broker so it can go to a Dead Letter Queue (use value -1 to define infinite number of redeliveries)

maximumRedeliveryDelay

-1

Sets the maximum delivery delay that will be applied if the useExponentialBackOff option is set. (use value -1 to define that no maximum be applied) (v5.5)

initialRedeliveryDelay

1000L

The initial redelivery delay in milliseconds

redeliveryDelay

1000L

The delivery delay if initialRedeliveryDelay is 0 (v5.4)

useCollisionAvoidance

false

Should the redelivery policy use collision avoidance

useExponentialBackOff

false

Should exponential back-off be used (i.e. to exponentially increase the timeout)

backOffMultiplier

5

The back-off multiplier

 

 

參考網址:http://activemq.apache.org/redelivery-policy.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章