Commit 801593010dcc64f2dc97ebd1bfd944c989bf431b

Authored by Dmytro Shvaika
1 parent 3ceb9d31

removed unnecessary flag

... ... @@ -56,8 +56,6 @@ public class TbRuleEngineProcessingStrategyFactory {
56 56 private final boolean retryTimeout;
57 57 private final int maxRetries;
58 58 private final double maxAllowedFailurePercentage;
59   -
60   - private final boolean multiplyPauseBetweenRetries;
61 59 private final long maxPauseBetweenRetries;
62 60
63 61 private long pauseBetweenRetries;
... ... @@ -73,7 +71,6 @@ public class TbRuleEngineProcessingStrategyFactory {
73 71 this.maxRetries = configuration.getRetries();
74 72 this.maxAllowedFailurePercentage = configuration.getFailurePercentage();
75 73 this.pauseBetweenRetries = configuration.getPauseBetweenRetries();
76   - this.multiplyPauseBetweenRetries = configuration.isMultiplyPauseBetweenRetries();
77 74 this.maxPauseBetweenRetries = configuration.getMaxPauseBetweenRetries();
78 75 }
79 76
... ... @@ -114,7 +111,7 @@ public class TbRuleEngineProcessingStrategyFactory {
114 111 } catch (InterruptedException e) {
115 112 throw new RuntimeException(e);
116 113 }
117   - if (multiplyPauseBetweenRetries && maxPauseBetweenRetries > pauseBetweenRetries) {
  114 + if (maxPauseBetweenRetries > pauseBetweenRetries) {
118 115 pauseBetweenRetries = Math.min(maxPauseBetweenRetries, pauseBetweenRetries * 2);
119 116 }
120 117 }
... ...
... ... @@ -743,8 +743,7 @@ queue:
743 743 retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
744 744 failure-percentage: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
745 745 pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRY_PAUSE:3}"# Time in seconds to wait in consumer thread before retries;
746   - multiply-pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_MUL_RETRY_PAUSE:false}"# Parameter to enable/disable multiplication of pause value between retries on each iteration;
747   - max-pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:25}"# Max allowed time in seconds for pause between retries.
  746 + max-pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:0}"# Max allowed time in seconds for pause between retries.
748 747 - name: "${TB_QUEUE_RE_HP_QUEUE_NAME:HighPriority}"
749 748 topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
750 749 poll-interval: "${TB_QUEUE_RE_HP_POLL_INTERVAL_MS:25}"
... ... @@ -760,8 +759,7 @@ queue:
760 759 retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRIES:0}" # Number of retries, 0 is unlimited
761 760 failure-percentage: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
762 761 pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
763   - multiply-pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_MUL_RETRY_PAUSE:false}"# Parameter to enable/disable multiplication of pause value between retries on each iteration;
764   - max-pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:120}"# Max allowed time in seconds for pause between retries.
  762 + max-pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:0}"# Max allowed time in seconds for pause between retries.
765 763 - name: "${TB_QUEUE_RE_SQ_QUEUE_NAME:SequentialByOriginator}"
766 764 topic: "${TB_QUEUE_RE_SQ_TOPIC:tb_rule_engine.sq}"
767 765 poll-interval: "${TB_QUEUE_RE_SQ_POLL_INTERVAL_MS:25}"
... ... @@ -777,8 +775,7 @@ queue:
777 775 retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
778 776 failure-percentage: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
779 777 pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
780   - multiply-pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_MUL_RETRY_PAUSE:false}"# Parameter to enable/disable multiplication of pause value between retries on each iteration;
781   - max-pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:120}"# Max allowed time in seconds for pause between retries.
  778 + max-pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:0}"# Max allowed time in seconds for pause between retries.
782 779 transport:
783 780 # For high priority notifications that require minimum latency and processing time
784 781 notifications_topic: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC:tb_transport.notifications}"
... ...
... ... @@ -24,7 +24,6 @@ public class TbRuleEngineQueueAckStrategyConfiguration {
24 24 private int retries;
25 25 private double failurePercentage;
26 26 private long pauseBetweenRetries;
27   - private boolean multiplyPauseBetweenRetries;
28 27 private long maxPauseBetweenRetries;
29 28
30 29 }
... ...