I use vm (or seda) with ?multipleConsumers=true to implement a
request-reply observer pattern:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route id="subject">
<from uri="file:data/spike/in?noop=true"/>
<log message="starting file '${header.CamelFileName}' ..."/>
<to uri="vm:subjectStarted" pattern="InOut"/>
<log message="file '${header.CamelFileName}' done"/>
</route>
<route id="subjectListener1">
<from uri="vm:subjectStarted?multipleConsumers=true"/>
<log message=" starting file '${header.CamelFileName}' ..."/>
<log message=" file '${header.CamelFileName}' done"/>
</route>
<route id="subjectListener2">
<from uri="vm:subjectStarted?multipleConsumers=true"/>
<log message=" starting file '${header.CamelFileName}' ..."/>
<log message=" file '${header.CamelFileName}' done"/>
</route>
</camelContext>
</beans>
when running this sample i always got an ExchangeTimedOutException
although all listeners have finished before the timeout.
Any ideas?