[ 
https://issues.apache.org/jira/browse/SYNAPSE-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vanjikumaran Sivajothy updated SYNAPSE-1049:
--------------------------------------------
    Attachment: SYNAPSE-1049.diff

Sample 702 Modified to demonstrate the improved functionality.

{Code}
<definitions xmlns="http://ws.apache.org/ns/synapse";>

    <endpoint name="StockQuoteServiceEp">
        <address uri="http://localhost:9000/services/SimpleStockQuoteService";>
            <suspendOnFailure>
                <errorCodes>-1</errorCodes>
                <progressionFactor>1.0</progressionFactor>
            </suspendOnFailure>
        </address>
    </endpoint>
    <sequence name="fault">
        <log level="full">
            <property name="MESSAGE" value="Executing default 'fault' 
sequence"/>
            <property name="ERROR_CODE" 
expression="get-property('ERROR_CODE')"/>
            <property name="ERROR_MESSAGE" 
expression="get-property('ERROR_MESSAGE')"/>
        </log>
        <drop/>
    </sequence>
    <sequence name="main">
        <in>
            <log level="full"/>
            <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
            <property name="OUT_ONLY" value="true"/>
            <property name="target.endpoint" value="StockQuoteServiceEp"/>
            <store messageStore="MyStore"/>
        </in>
        <description>The main sequence for the message mediation</description>
    </sequence>
    <messageStore name="MyStore"/>
    <messageProcessor 
class="org.apache.synapse.message.processors.forward.ScheduledMessageForwardingProcessor"
 name="ScheduledProcessor" messageStore="MyStore">
        <parameter name="interval">10000</parameter>
        <parameter name="max.deliver.attempts">2</parameter>
        <parameter name="max.deliver.drop">true</parameter>
    </messageProcessor>
</definitions>
{code}


*Client*
{code}
ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService 
-Dtrpurl=http://localhost:8280/ -Dmode=placeorder
{code}

> Drop the message from store after Max deliver attempt
> -----------------------------------------------------
>
>                 Key: SYNAPSE-1049
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-1049
>             Project: Synapse
>          Issue Type: Improvement
>            Reporter: Vanjikumaran Sivajothy
>            Assignee: Hiranya Jayathilaka
>         Attachments: SYNAPSE-1049.diff
>
>
> In message forwarding processor  with message store use-case, the message 
> processor will get deactivated after max delivery attempts and rest of the 
> message will pilled up in the queue due to BE failure or invalid message 
> format. 
> If message forwarding processor has the flexibility to drop the message when 
> user explicitly mention to drop the message after max delivery attempt, It is 
> possible to prevent the Queue pill up in Message Store.
> To solve this, Introduce new parameter in ForwardingJob and drop the message 
> based on the condition where it should have max delivery + drop enabled. 
> *Example*
> {code}
>  <messageProcessor 
> class="org.apache.synapse.message.processors.forward.ScheduledMessageForwardingProcessor"
>  name="ScheduledProcessor" messageStore="MyStore">
>         <parameter name="interval">10000</parameter>
>         <parameter name="max.deliver.attempts">2</parameter>
>         <parameter name="max.deliver.drop">true</parameter>
>     </messageProcessor>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to