Hi Isuru,

I think this is the best option. I did testing with attaching cloned MC as
original message property and this is working fine.

Thanks.

On Tue, Mar 17, 2015 at 2:48 PM, Isuru Ranawaka <isu...@wso2.com> wrote:

> Hi chathura,
>
> Yes you need to clone the MC because we need to save content it is ok. but
> instead of keep external store which can be caused OOM exceptions can't we
> attached clone MC as original MC property and when response received we can
> get that property and get the cloned MC for next send if response http code
> belongs to retry code. So then we dont need to externally map request to
> response because response has all the synapse properties which were in
> request.
>
>
> thanks
>
> On Tue, Mar 17, 2015 at 2:37 PM, Chathura Priyankara <chathu...@wso2.com>
> wrote:
>
>> Hi Isuru,
>>
>> We need to clone and store the message to resend it based on the response
>> status code. If the response http status code is success then the stored
>> message context will removed.
>> This cloning and storing process should be happened in the Failover
>> endpoint only if failover http status codes are set for a particular
>> endpoint in the configuration. If we store the cloned
>> message at the Failover endpoint level we cannot map the request and
>> response based on the MID since MID is changed after sending.
>> Is there anyway that I could do the same thing without cloning message
>> context ?
>>
>> Thanks!
>>
>> On Tue, Mar 17, 2015 at 2:22 PM, Isuru Ranawaka <isu...@wso2.com> wrote:
>>
>>> Hi Chathura,
>>>
>>> When message is gone through Axis2FlexibleMEPClient it partially cloned
>>> underlying axis2MessageContext and set all the endpoint specific data to
>>> that cloned MC and register a callback for send it to BE .It may be a
>>> reason for change the MID. Why we need a to store message context
>>> externally?
>>>
>>> I think this may add up huge memory overhead if message store keeps
>>> growing (for high concurrent scenarios and responses are too late to arrive)
>>>
>>> thanks
>>>
>>> On Tue, Mar 17, 2015 at 1:21 PM, Chathura Priyankara <chathu...@wso2.com
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm working on my fast track training project [1]. I have to implement
>>>> http status code support for FailoverEndpoint. For the re-sending purposes
>>>> the original request message context needs to be  cloned and store using
>>>> the message ID as the reference. The message cloning should be done in the
>>>> FailoverEndpoint based on the synapse configuration.
>>>>
>>>> IMO the original request id changes to a new one after it sent from the
>>>> FailoverEndpoint at the Axis2FlexibleMEPClient level.
>>>>
>>>> Is this correct or I'm missing something here ?
>>>>
>>>> [1] https://redmine.wso2.com/issues/3725
>>>>
>>>> Thanks.
>>>> Best Regards.
>>>>
>>>> --
>>>> Chathura Priyankara
>>>> Software Engineer | WSO2 Inc.
>>>> Mobile : +94718795340
>>>> Blog : www.codeoncloud.blogspot.com
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards
>>> Isuru Ranawaka
>>> M: +94714629880
>>> Blog : http://isurur.blogspot.com/
>>>
>>
>>
>>
>> --
>> Chathura Priyankara
>> Software Engineer | WSO2 Inc.
>> Mobile : +94718795340
>> Blog : www.codeoncloud.blogspot.com
>>
>
>
>
> --
> Best Regards
> Isuru Ranawaka
> M: +94714629880
> Blog : http://isurur.blogspot.com/
>



-- 
Chathura Priyankara
Software Engineer | WSO2 Inc.
Mobile : +94718795340
Blog : www.codeoncloud.blogspot.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to