synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [synapse] isudana commented on a change in pull request #41: Add retry interval feature
Date Mon, 20 Apr 2020 13:28:00 GMT

isudana commented on a change in pull request #41:
URL: https://github.com/apache/synapse/pull/41#discussion_r411376184



##########
File path: modules/core/src/main/java/org/apache/synapse/message/processors/forward/ForwardingJob.java
##########
@@ -80,20 +85,31 @@ private void configureForwardingJob(JobDataMap jdm) {
                 ScheduledMessageForwardingProcessor.BLOCKING_SENDER);
         processor = (ScheduledMessageForwardingProcessor) jdm.get(
                 ScheduledMessageForwardingProcessor.PROCESSOR_INSTANCE);
+        retryInterval = 1000;
+
+        setParameters(jdm);
+    }
+
+    private void setParameters(JobDataMap jdm) {
         Map<String, Object> parameters = (Map<String, Object>) jdm.get(MessageProcessorConstants.PARAMETERS);
-        maxDeliverAttempts = extractMaxDeliveryAttempts(parameters, processor);
-        isMaxDeliverAttemptDropEnabled = isMaxDeliverAttemptDropEnabled(parameters);
-        retryHttpStatusCodes(parameters);
-        setSequences(parameters);
+        if (parameters != null) {
+            maxDeliverAttempts = extractMaxDeliveryAttempts(parameters, processor);
+            isMaxDeliverAttemptDropEnabled = isMaxDeliverAttemptDropEnabled(parameters);
+            if (parameters.get(ForwardingProcessorConstants.RETRY_INTERVAL) != null) {
+                retryInterval = Integer.parseInt((String) parameters.get(ForwardingProcessorConstants.RETRY_INTERVAL));

Review comment:
       Shouldn't we handle NumberformatException here?
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message