Commit ac2a0f51050ce6c7600681da72056f6d003256af

Authored by Dmytro Shvaika
1 parent 9aff0692

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 }
... ...
... ... @@ -725,8 +725,7 @@ queue:
725 725 retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
726 726 failure-percentage: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
727 727 pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRY_PAUSE:3}"# Time in seconds to wait in consumer thread before retries;
728   - 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;
729   - max-pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:25}"# Max allowed time in seconds for pause between retries.
  728 + max-pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:0}"# Max allowed time in seconds for pause between retries.
730 729 - name: "${TB_QUEUE_RE_HP_QUEUE_NAME:HighPriority}"
731 730 topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
732 731 poll-interval: "${TB_QUEUE_RE_HP_POLL_INTERVAL_MS:25}"
... ... @@ -742,8 +741,7 @@ queue:
742 741 retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRIES:0}" # Number of retries, 0 is unlimited
743 742 failure-percentage: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
744 743 pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
745   - 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;
746   - max-pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:120}"# Max allowed time in seconds for pause between retries.
  744 + max-pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:0}"# Max allowed time in seconds for pause between retries.
747 745 - name: "${TB_QUEUE_RE_SQ_QUEUE_NAME:SequentialByOriginator}"
748 746 topic: "${TB_QUEUE_RE_SQ_TOPIC:tb_rule_engine.sq}"
749 747 poll-interval: "${TB_QUEUE_RE_SQ_POLL_INTERVAL_MS:25}"
... ... @@ -759,8 +757,7 @@ queue:
759 757 retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
760 758 failure-percentage: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
761 759 pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
762   - 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;
763   - max-pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:120}"# Max allowed time in seconds for pause between retries.
  760 + max-pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_MAX_MUL_RETRY_PAUSE:0}"# Max allowed time in seconds for pause between retries.
764 761 transport:
765 762 # For high priority notifications that require minimum latency and processing time
766 763 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 }
... ...