Reputation: 1045
This has to be a common feature, but I can't seem to get a handle on finding it. I have a flow like;
<inbound-endpoint.../>
<collection-splitter.../>
<custom component.../>
...
If the custom component receives a message I want to discard with no further action, how is it accomplished? I don't want to abort processing the remaining elements of the collection, just the one item.
For now, I have the component return null and follow it with a payload-type-filter, but that seems clumsy.
Upvotes: 1
Views: 1634
Reputation: 1459
We should use message filters in mule 3 flows. setStopFurtherProcessing of MuleEventContext is not supported for mule 3 flows.
<message-filter doc:name="Message">
<not-filter>
<payload-type-filter expectedType="org.mule.transport.NullPayload"></payload-type-filter>
</not-filter>
</message-filter>
Upvotes: 0
Reputation: 33413
In that case, transform your component into an interceptor: the component will decide to forward or not the current Mule event for downstream processing.
For this you need to implement org.mule.api.interceptor.Interceptor
.
Read the following for more information: http://www.mulesoft.org/documentation/display/current/Using+Interceptors#UsingInterceptors-WritingInterceptors
Upvotes: 2