Re: Adding another interval for retry in Scheduled Message Forwarding Processor (SMFP)

2020-03-30 Thread shafreen anfar
On Mon, Mar 30, 2020 at 10:07 PM Isuru Udana  wrote:

> Hi Shafreen,
>
> +1, as you said fetching messages and retrying are two different concepts
> and we need to have two configurable parameters.
>

Thanks for the response, Isuru. Will start working on it.


>
> Thanks.
>
> On Sun, Mar 29, 2020 at 10:32 AM shafreen anfar 
> wrote:
>
>> Hi All,
>>
>> At the moment we only support one interval for both fetching messages
>> from the store and retrying when there is a failure. But, IMO, these are
>> two different concepts and deserve two different configurations. Therefore,
>> I am proposing a new configuration parameter for latter. Something as below,
>>
>> 1
>>
>> This will allow the user to control the speed of retry when there is a
>> failure.
>>
>> What do you think?
>>
>> Thanks,
>> Shafreen
>>
>
>
> --
> *Isuru Udana*
> Associate Director/Architect
>
>
>
> *; WSO2 Inc.; http://wso2.com email: isud...@gmail.com
>  *
>
>
>


[GitHub] [synapse] shafreenAnfar commented on issue #32: Improve Message Forwarding Processor (MFP) to support HTTP status codes

2020-03-30 Thread GitBox
shafreenAnfar commented on issue #32: Improve Message Forwarding Processor 
(MFP) to support HTTP status codes
URL: https://github.com/apache/synapse/pull/32#issuecomment-606358193
 
 
   Btw, do let me know if there is way to write a solid test-case for this.


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



Re: Improving Message Forwarding Processor (MFP) to support HTTP status codes

2020-03-30 Thread Isuru Udana
Hi Shafreen,

This is a very useful feature. We'll review and merge the PR.

Thanks. Regards

On Sat, Mar 28, 2020 at 10:23 PM shafreen anfar 
wrote:

> Hi All,
>
> At the moment, current MFP implementation does not support retrying based
> on HTTP status codes. It only supports retrying for transport level
> failures but not for application level failures. As you know, in HTTP
> protocol, application level failures are distinguished using different
> status codes. In the case of MFP, it is important to be able to retry for
> 5xx server errors. But there also could be rare occasions in which retrying
> for 4xx and 3xx are useful. Especially when dealing with servers that do
> not follow HTTP protocol exactly as it is.
>
> Therefore, I have improved MFP implementation to support retrying based on
> the returned HTTP status code as well. Say, a user wants to retry for HTTP
> status codes 500 and 504 but not for any other HTTP status code. In that
> case user can configure the MFP as below. Please note the parameter in bold
> font which I have introduced along with this feature.
>
> http://ws.apache.org/ns/synapse;
>
> class="org.apache.synapse.message.processors.forward.ScheduledMessageForwardingProcessor"
>   name="Processor2"
>   messageStore="JMSMS">
>4
> name="message.processor.reply.sequence">replySequence
>1000
>*500, 504*
> 
>
> Please not that the above parameter does not come to effect in case of
> out-only. Implementation of this feature can be found in [1]. Once this is
> merged, I am planning to send another PR for the required documentation
> changes.
>
> [1] https://github.com/apache/synapse/pull/32
>
> Thanks,
> Shafreen
>


-- 
*Isuru Udana*
Associate Director/Architect



*; WSO2 Inc.; http://wso2.com email: isud...@gmail.com
 *


[GitHub] [synapse] isudana commented on a change in pull request #32: Improve Message Forwarding Processor (MFP) to support HTTP status codes

2020-03-30 Thread GitBox
isudana commented on a change in pull request #32: Improve Message Forwarding 
Processor (MFP) to support HTTP status codes
URL: https://github.com/apache/synapse/pull/32#discussion_r400340740
 
 

 ##
 File path: modules/core/src/main/java/org/apache/synapse/SynapseConstants.java
 ##
 @@ -412,6 +412,9 @@
 
 public static final String HTTP_SENDER_STATUSCODE = 
"transport.http.statusCode";
 
+public static final String HTTP_INTERNAL_SERVER_ERROR = "500";
+public static final String HTTP_BAD_REQUEST_ERROR = "400";
+
 
 Review comment:
   +1, let's move this to MessageProcessorConsents


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



Re: Adding another interval for retry in Scheduled Message Forwarding Processor (SMFP)

2020-03-30 Thread Isuru Udana
Hi Shafreen,

+1, as you said fetching messages and retrying are two different concepts
and we need to have two configurable parameters.

Thanks.

On Sun, Mar 29, 2020 at 10:32 AM shafreen anfar 
wrote:

> Hi All,
>
> At the moment we only support one interval for both fetching messages from
> the store and retrying when there is a failure. But, IMO, these are two
> different concepts and deserve two different configurations. Therefore, I
> am proposing a new configuration parameter for latter. Something as below,
>
> 1
>
> This will allow the user to control the speed of retry when there is a
> failure.
>
> What do you think?
>
> Thanks,
> Shafreen
>


-- 
*Isuru Udana*
Associate Director/Architect



*; WSO2 Inc.; http://wso2.com email: isud...@gmail.com
 *


[GitHub] [synapse] isudana merged pull request #34: Add windows runner to workflow

2020-03-30 Thread GitBox
isudana merged pull request #34: Add windows runner to workflow
URL: https://github.com/apache/synapse/pull/34
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services

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