Wednesday, July 13, 2011

MULE - Payload & Exception type filter

Payload type filter checks for the data type of the object inside the Mule Message.
Exception type filter checks for the matching exception type.

<service name="ProcessInput">
            <inbound>
                <vm:inbound-endpoint path="processInputIN" />
            </inbound>
            <component class="org.mybusiness.components.ProcessInputComponent" />
            <outbound>
                <filtering-router>
                    <vm:outbound-endpoint path="computeLengthIN" />
                    <payload-type-filter
                        expectedType="java.lang.String" />
                </filtering-router>
                <!--
                    In your project you will be defining more specific
                    exceptions to be handled by different end-points
                -->
                <forwarding-catch-all-strategy>
                    <vm:outbound-endpoint path="processExceptionIN">
                        <exception-type-filter
                            expectedType="java.lang.Exception" />
                    </vm:outbound-endpoint>
                </forwarding-catch-all-strategy>
            </outbound>
        </service>

No comments:

Post a Comment