camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xlogger <>
Subject Apache Camel Splitter, Threadpool and JMS
Date Fri, 31 Jul 2015 01:44:15 GMT
I posted the question on stackoverflow 3 days ago but got no response so
far... repost here to see if anyone could advice on that. 

I have defined the following route in spring xml to split rows in a text
file and send each row to a JMS queue

<bean id="myPool" class="java.util.concurrent.Executors"

<camelContext id="concurrent-route-context"
xmlns="" trace="true">
    <route id="inbox-threadpool-split-route">
        <from uri="{{inbox.uri}}" />
            <log message="Starting to process file: ${header.CamelFileName}"
            <split streaming="true" executorServiceRef="myPool">
                <tokenize token="\n" />
                <to uri="{{inventory.queue.uri}}" />    
            <log message="Done processing file: ${header.CamelFileName}" />

inbox.uri is a file component uri listening for file in a directory, while
inventory.queue.uri is a JmsComponent uri that connecting to a queue in JMS
server(Tibco EMS 6.X version). The JmsComponent uri is simple like

The above route can be run without error, but the rows splitted from file
are not sent to the queue as JMS message (i.e. the queue is still empty
after the program has run)

If I remove the executorServiceRef="myPool" from the splitter definition
(remaining definition like <split streaming="true"> only), the splitted
messages can be delivered to JMS queue one by one.

If I replace the "to" uri with a "direct" endpoint, then splitted messages
can be delivered no matter threadpool is used in splitter or not

Is there any special setting required in JmsComponent in order to make it
works with Splitter + threadpool? or any other configurations I have missed?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message