You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by alexey-s <al...@mail.ru> on 2013/07/16 13:39:53 UTC
recipientList and several CamelContext
Hi all.
There is a process of loading data from external systems.
// first osgi bundle
from("direct:loadFile")
.id("exchangeCheckUnloadedAttach")
.split().method(unloadedAttachSplitter, "findUnloadedAttach")
.recipientList()
.method(dynamicRouter, "getVerifyAttachRoutes")
.aggregationStrategy(verifyLoadAggregation) // operation Boolen OR
.choice()
.when(body(Boolean.class).isEqualTo(Boolean.TRUE))
.log(LoggingLevel.INFO, "load URL ${header.CamelHttpUrl}")
.to("direct:loadFile")
.otherwise()
.log(LoggingLevel.WARN, "skip URL ${header.CamelHttpUrl}")
.to("direct:skipFile")
.end()
.end()
// second osgi bundle
from("vm:appVerifyAttach?concurrentConsumers=1&waitForTaskToComplete=Always")
.id("appVerifyAttch")
.transacted("required")
.bean(verifyLoadAttach, "verify");
2013-07-16 13:23:04,841 | WARN | oc-read_Worker-2 |
exchangeCheckUnloadedAttach | 103 - org.apache.camel.camel-core - 2.10.3 |
skip URL http://zakupki.gov.ru/pgz/documentdownload?documentId=71943651
2013-07-16 13:23:05,450 | INFO | appVerifyAttach | VerifyLoadAttach | 150 -
app-exchange-doc-read - 1.4.0 | add to load URL
http://zakupki.gov.ru/pgz/documentdownload?documentId=71943677
The first number in the log entry appears in section choice-otherwise.
The second number will appear in the journal entry from dynamicRouter
process "vm:appVerifyAttach".
Why operator of choice has executed before the process worked
"vm:appVerifyAttach"?
I'm using Apache Karaf 2.2.8 and Apache Camel 2.10.3.
--
View this message in context: http://camel.465427.n5.nabble.com/recipientList-and-several-CamelContext-tp5735714.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: recipientList and several CamelContext
Posted by alexey-s <al...@mail.ru>.
A small mistake. The first process begins
from("quartz://core-oos/attach?cron={{exchange.doc.attach.cron}}&stateful=true")
--
View this message in context: http://camel.465427.n5.nabble.com/recipientList-and-several-CamelContext-tp5735714p5735715.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: recipientList and several CamelContext
Posted by alexey-s <al...@mail.ru>.
I'm change vm component to direct-vm component.
See http://camel.apache.org/direct-vm.html
It's work!
--
View this message in context: http://camel.465427.n5.nabble.com/recipientList-and-several-CamelContext-tp5735714p5735725.html
Sent from the Camel - Users mailing list archive at Nabble.com.