i defined a route in java:
RouteDefinition rtdmProcess =
from(cepOutputWindow).process(rtdmProcessor);
MulticastDefinition multicast = rtdmProcess.multicast();
//.parallelProcessing() not working
log.info("Configuring route from cep window " +
cepOutputWindow + " to " + rtdmUrl
+ " with following events: ");
// loop over event names to use same data for every target
event
// and send it to rtdm
for (String eventName : rtdmTargetEvents) {
//CxfEndpoint cxf = new CxfEndpoint(rtdmUrl, new
CxfComponent(this.getContext()));
//cxf.setServiceClass(EventPortType.class);
String cxf = "cxf:" + rtdmUrl + "?serviceClass=" +
EventPortType.class.getCanonicalName();
multicast.process(rtdmSetNameFactory.get(eventName)).to(cxf);
log.info(eventName + ",");
multicast.end().process(handleRtdmAnswer);
rtdmProcess.setId(Routes.RouteIds.cepToRtdm.name() +
cepOutputWindow);
rtdmProcess.autoStartup(true);
this route takes data from "cepOutputWindow" and creates a soap-message from
it. This soap message must be sent to one web-service multiple times but
eache message sent will have one attribute (name - sumething like a
subservice) different (rtdmSetNameFactory.get(eventName)).
This is working as intended. For each exchange put in i get n messages sent
to ws with n different names.
My problem is: as soon as i add .parallelProcessing() (in line 2) i get n
messages sent to name1 and the next n messages sent to name2. So service
with name1 only sees the first n and service with name2 only sees the 2nd
bunch.
What is wrong with my route?
RouteDefinition rtdmProcess =
from(cepOutputWindow).process(rtdmProcessor);
MulticastDefinition multicast = rtdmProcess.multicast();
//.parallelProcessing() not working
log.info("Configuring route from cep window " +
cepOutputWindow + " to " + rtdmUrl
+ " with following events: ");
// loop over event names to use same data for every target
event
// and send it to rtdm
for (String eventName : rtdmTargetEvents) {
//CxfEndpoint cxf = new CxfEndpoint(rtdmUrl, new
CxfComponent(this.getContext()));
//cxf.setServiceClass(EventPortType.class);
String cxf = "cxf:" + rtdmUrl + "?serviceClass=" +
EventPortType.class.getCanonicalName();
multicast.process(rtdmSetNameFactory.get(eventName)).to(cxf);
log.info(eventName + ",");
multicast.end().process(handleRtdmAnswer);
rtdmProcess.setId(Routes.RouteIds.cepToRtdm.name() +
cepOutputWindow);
rtdmProcess.autoStartup(true);
this route takes data from "cepOutputWindow" and creates a soap-message from
it. This soap message must be sent to one web-service multiple times but
eache message sent will have one attribute (name - sumething like a
subservice) different (rtdmSetNameFactory.get(eventName)).
This is working as intended. For each exchange put in i get n messages sent
to ws with n different names.
My problem is: as soon as i add .parallelProcessing() (in line 2) i get n
messages sent to name1 and the next n messages sent to name2. So service
with name1 only sees the first n and service with name2 only sees the 2nd
bunch.
What is wrong with my route?