Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:hello" />
- <enrich uri="http://localhost:8080/hello?a=b" />
- <convertBodyTo type="java.lang.String" />
- </route>
- <route>
- <from uri="direct:another" />
- <enrich uri="http://localhost:8080/another?a=b" />
- <convertBodyTo type="java.lang.String" />
- </route>
- <route>
- <from uri="direct:multi" />
- <multicast parallelProcessing="true" strategyRef="aggregator">
- <enrich uri="direct:hello" />
- <enrich uri="direct:another" />
- </multicast>
- </route>
- <route>
- <from uri="timer://foo?period=10000" />
- <to uri="direct:multi" />
- <setBody>
- <simple>
- ${property[CamelGroupedExchange]}
- </simple>
- </setBody>
- <camel:transform>
- <camel:groovy>
- import groovy.json.*
- def slurper = new JsonSlurper()
- print "debubggyg\n"
- print request.getBody()[1].getIn()
- print "\n"
- print request.getBody()[1].getIn().getBody()
- def res = request.getBody().inject("") { result, i -> result +i.getIn().getBody()};
- request =res;
- </camel:groovy>
- </camel:transform>
- <from uri="spring-amqp:ex2:q2?durable=true&type=topic&autodelete=false&routingKey=r2"/>
- <to uri="log:marsha_3?multiline=true" />
- </route>
- </camelContext>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement