I found a way that was to call the jms endpoint in a clone mediator, and
configure the endpoint to discard the message in case of a failure:


<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse";
       name="NonStopProxy"
       startOnLoad="true"
       statistics="disable"
       trace="disable"
       transports="http,https">
   <target>
      <inSequence>
         <log level="full">
<property name="BEFORE SEND TO THE QUEUE" value="**************************"
/>
</log>
<clone xmlns="http://ws.apache.org/ns/synapse"; continueParent="true">
  <target>
   <sequence>
<log>
<property name="BEFORE SEND TO THE QUEUE" value="INSIDE CLONE" />
</log>
<call>
<endpoint>
  <address uri=
"jms:/MyTopic?transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory&amp;java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&amp;java.naming.provider.url=conf/jndi.properties&amp;transport.jms.DestinationType=topic"
>
  <timeout>
<duration>30000</duration>
<responseAction>discard</responseAction>
  </timeout>
  <suspendOnFailure>
  <errorCodes>-1</errorCodes>
  <initialDuration>0</initialDuration>
  <progressionFactor>1.0</progressionFactor>
  <maximumDuration>0</maximumDuration>
  </suspendOnFailure>
  <markForSuspension>
  <errorCodes>-1</errorCodes>
  </markForSuspension>
  </address>
</endpoint>
</call>
</sequence>
  </target>
  </clone>
   <log>
<property name="AFTER SEND TO THE QUEUE" value="**************************"
/>
</log>
<respond />
      </inSequence>
   </target>
   <description/>
</proxy>


Thanks

2017-07-19 10:03 GMT-03:00 Júnior <[email protected]>:

> Hi Himasha, Thanks ffor your reply.
>
> My point is:
>
> I would like to know if it is possible to not be redirected to a fault
> sequence, just proceed. would that be possible?
>
> Thanks,
>
> 2017-07-19 1:24 GMT-03:00 Himasha Guruge <[email protected]>:
>
>> Hi,
>>
>> You could use the  SET_ROLLBACK_ONLY property in a fault sequence, so
>> that when a failure occurs the transaction will be rolled back. Please
>> refer [1] for more information.
>>
>> [1] https://docs.wso2.com/display/ESB500/JMS+Transactions
>>
>> Thanks,
>> Himasha
>>
>> On Wed, Jul 19, 2017 at 1:45 AM, Júnior <[email protected]> wrote:
>>
>>> Hello,
>>>
>>> I have a proxy and inside the proxy we have some calls to a  template
>>> for auditing that just post a message to a queue.
>>>
>>> I'd like that even if there is a problem when sending the message to
>>> queue, the processing proceed in the Proxy.
>>>
>>> Is there any way of doing that?
>>>
>>> Any ideas are very welcome.
>>>
>>> Thanks,
>>> --
>>> Francisco Ribeiro
>>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Himasha Guruge
>> *Software Engineer*
>> WS*O2* *Inc.*
>> Mobile: +94 777459299 <+94%2077%20745%209299>
>> [email protected]
>>
>
>
>
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>



-- 
Francisco Ribeiro
*SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to