Reputation: 43
I have a Mule project with 8 flow that is listening file form different locations in wmq. This wmq is further attached with java transformer and more for further processing. Is there a way I can restrict my flow from only processing one file at a time if two files or more than two files are there in the same queue.
Essentially, the way I'd like my application to work is if two files are dropped at the same time, Mule picks up one, processes it, and only when the flow has finished start processing the next file.
Right now, what happening is, flow is picking all the files at once before completing the whole process. I am using one-way pattern in wmq. Please see the link for the one part of the flow which i have created
How to make compatible wmq with java code in MULE
Upvotes: 0
Views: 222
Reputation: 33413
For the queue you want to consume serially, make sure that:
wmq:inbound-endpoint
is configured by a wmq:connector
that has numberOfConsumers="1"
(http://www.mulesoft.org/documentation/display/current/Mule+WMQ+Transport+Reference)processingStrategy="synchronous"
(http://www.mulesoft.org/documentation/display/current/Flow+Processing+Strategies)Upvotes: 1