Of course, I figure it out 30 minutes after posting. This route works as
desired:
from("stomp:request_queue").
bean(new MyGenerator()).
split(body(), new MyAggregationStrategy()).
parallelProcessing().executorService(Executors.newFixedThreadPool(4)).
bean(new MyRunner()).
end().
recipientList(simp
My desired flow is:
endpoint routes to bean
bean creates multiple child messages from source
split on body
child messages process in parallel, up to a max
aggregate results
reply w/ aggregated results
I've tried several different configurations. I've been able to make it all
process like a queue,
I built proton-jms 0.8 (which should fix the above JIRA issue) from source
and I've overridden 0.7 in my pom, but now I'm getting a timeout stacktrace.
WARN [2014-08-11 19:08:22,961]
org.apache.camel.component.jms.DefaultJmsMessageListenerContainer: Setup of
JMS message listener invoker failed fo
It seems I'm seeing the same behavior with AMQP?
BrokerService brokerService = new BrokerService();
// We have to specify 'transport.transformer=raw' or we get an NPE due to
x-opt-jms-type being null
// See: https://issues.apache.org/jira/browse/PROTON-631
brokerService.addConnector("amqp://localh
Here's the ActiveMQ/Camel setup:
BrokerService brokerService = new BrokerService();
brokerService.addConnector("stomp://localhost:61613");
brokerService.start();
CamelContext camelContext = new DefaultCamelContext();
StompComponent stompComponent = new StompComponent();
camelContext.addComponent("
I'm trying to either implement a request-response with stomp, using either:
1. a temporary queue via the reply-to header or
2. the correlation-id header to filter responses on a common response queue
route1:
from("stomp:request_queue").
log("headers ${headers}").
bean(new MyGenerator()).
split(b
Route definition:
from("activemq:test_request_queue").
log("#1 ${in.body}").
bean(TestOne.class). // hard coded to return a String[3]
log("#2 ${in.body[0]} ${in.body[1]} ${in.body[2]}").
split().body().
log("#3 ${in.body} ${property.CamelSplitIndex} ${property.CamelSplitSize}
${property.CamelSplit
I figured it out.
Simply changing
split().body()
to
split(body(), new TestAggregationStrategry())
Allowed me to customize the result of the split/aggregation. I now have the
aggregated results of TestTwo being sent to the response queue.
--
View this message in context:
http://camel.465427