18#ifndef _ACTIVEMQ_CORE_POLICIES_DEFAULTREDELIVERYPOLICY_H_
19#define _ACTIVEMQ_CORE_POLICIES_DEFAULTREDELIVERYPOLICY_H_
32 double backOffMultiplier;
33 double collisionAvoidanceFactor;
34 long long initialRedeliveryDelay;
35 int maximumRedeliveries;
36 bool useCollisionAvoidance;
37 bool useExponentialBackOff;
38 long long redeliveryDelay;
39 long long maximumRedeliveryDelay;
53 return this->backOffMultiplier;
57 this->backOffMultiplier = value;
65 return this->initialRedeliveryDelay;
69 this->initialRedeliveryDelay = value;
73 return this->redeliveryDelay;
77 this->redeliveryDelay = value;
81 return this->maximumRedeliveries;
85 this->maximumRedeliveries = value;
89 return this->useCollisionAvoidance;
93 this->useCollisionAvoidance = value;
97 return this->useExponentialBackOff;
101 this->useExponentialBackOff = value;
105 return this->maximumRedeliveryDelay;
109 this->maximumRedeliveryDelay = value;
#define AMQCPP_API
Definition: Config.h:30
Interface for a RedeliveryPolicy object that controls how message Redelivery is handled in ActiveMQ-C...
Definition: RedeliveryPolicy.h:34
Definition: DefaultRedeliveryPolicy.h:29
virtual void setMaximumRedeliveryDelay(long long value)
Sets the maximum amount of time that the redelivery delay is allowed to increase to before it is capp...
Definition: DefaultRedeliveryPolicy.h:108
virtual void setInitialRedeliveryDelay(long long value)
Sets the initial time that redelivery will be delayed.
Definition: DefaultRedeliveryPolicy.h:68
virtual short getCollisionAvoidancePercent() const
virtual void setCollisionAvoidancePercent(short value)
virtual void setUseExponentialBackOff(bool value)
Definition: DefaultRedeliveryPolicy.h:100
virtual bool isUseCollisionAvoidance() const
Definition: DefaultRedeliveryPolicy.h:88
virtual ~DefaultRedeliveryPolicy()
virtual long long getMaximumRedeliveryDelay() const
Returns the maximum amount of time that the redelivery delay is allowed to increase to before it is c...
Definition: DefaultRedeliveryPolicy.h:104
virtual long long getInitialRedeliveryDelay() const
Gets the initial time that redelivery of messages is delayed.
Definition: DefaultRedeliveryPolicy.h:64
virtual void setRedeliveryDelay(long long value)
Sets the time that redelivery will be delayed.
Definition: DefaultRedeliveryPolicy.h:76
DefaultRedeliveryPolicy()
virtual long long getNextRedeliveryDelay(long long previousDelay)
Given the last used redelivery delay calculate the next value of the delay based on the settings in t...
virtual void setBackOffMultiplier(double value)
Sets the Back-Off Multiplier for Message Redelivery.
Definition: DefaultRedeliveryPolicy.h:56
virtual long long getRedeliveryDelay() const
Gets the time that redelivery of messages is delayed.
Definition: DefaultRedeliveryPolicy.h:72
virtual RedeliveryPolicy * clone() const
Create a copy of this Policy and return it.
virtual double getBackOffMultiplier() const
Definition: DefaultRedeliveryPolicy.h:52
virtual bool isUseExponentialBackOff() const
Definition: DefaultRedeliveryPolicy.h:96
virtual void setMaximumRedeliveries(int value)
Sets the Maximum allowable redeliveries for a Message.
Definition: DefaultRedeliveryPolicy.h:84
virtual void setUseCollisionAvoidance(bool value)
Definition: DefaultRedeliveryPolicy.h:92
virtual int getMaximumRedeliveries() const
Gets the Maximum number of allowed redeliveries for a message before it will be discarded by the cons...
Definition: DefaultRedeliveryPolicy.h:80
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition: CachedConsumer.h:24