Visualisation

2011-01-19 Thread serega
I am trying to use camel:dot goal, but I am getting exception: [INFO] [camel:dot {execution: default-cli}] [INFO] Running Camel embedded to load Spring XML files from classpath: META-INF/spring/camel-context.xml [ERROR] Failed to run Camel embedded: java.lang.ClassNotFoundException: org.apache.c

Re: RoutingSlip and Splitter

2011-01-11 Thread serega
Claus Ibsen-2 wrote: > > > If the split is the same then just add it as a separate route and link > using direct endpoint > > from("direct:splitMe") >.split(body().tokenize(",")) >.recipientList(header("route")); > > And then just send to "direct:spltMe" in your routing slip. > > Cla

Re: RoutingSlip and Splitter

2011-01-11 Thread serega
I was able to achieve splitting before recipient list. Here is my test route ChoiceDefinition choice = from("direct:e").bean("RoutingSlip", "computeSlip").choice(); choice.when(header("split").isNotNull()).split(body(String.class).tokenize(",")).recipientList(header("route")); choice.otherwise(

RoutingSlip and Splitter

2011-01-11 Thread serega
I have the following use case. A message needs to go through a sequence of steps not known during design time, and finally goes out to some JMS queue, also not known at desing time. A RoutingSlip design pattern fits to this use case. But, some messages _may_ need to be split before going out to th

Re: LoadBalansing configuration

2010-12-23 Thread serega
Willem.Jiang wrote: > > Hi, > I don't think Camel support to add and remove the endpoints of the > LoadBalancer as you want in the runtime. > But the now camel route can be start and stop in the runtime. maybe you > can consider to stop the route, change the route and start it again. > Can y

LoadBalansing configuration

2010-12-22 Thread serega
Hi. I can easily create a route using Java DSL of the form from("foo").loadBalance().to("bar").("bla"), which is perfect for static routes. How can I do the same but without DSL. Something like CamelContext context = new DefaultCamelContext();. LoadBalancer balancer = new RoundRobinLoadBalancer()

Re: ProducerTemplate with Spring and without

2010-11-16 Thread serega
The fundamental question is how do I test my routes with mock endpoints on both ends? The following code works. public class CamelTest extends CamelTestSupport { @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndpoint; @Produce(uri = "direct:start") protected

ProducerTemplate with Spring and without

2010-11-15 Thread serega
Hi. I've tried examples from here http://camel.apache.org/spring-testing.html Two questions: 1. is how do I specify the producer template in spring? I've tried the following line I got org.apache.camel.NoSuchEndpointException: No endpoint could be found for: ref:direct:start 2. How to I write

Re: Custom Router

2010-10-22 Thread serega
Claus Ibsen-2 wrote: > > On Fri, Oct 22, 2010 at 3:42 PM, serega > wrote: >> >> So, how does exactly Dynamic Router work and why does it have "to return >> null >> to indicate the end"? >> Suppose my Dynamic Router returns "file://some_dir

Re: Custom Router

2010-10-22 Thread serega
So, how does exactly Dynamic Router work and why does it have "to return null to indicate the end"? Suppose my Dynamic Router returns "file://some_directory". What happens with the message after the call returns? Sergey. -- View this message in context: http://camel.465427.n5.nabble.com/Custom-

Re: Custom Router

2010-10-15 Thread serega
bably). > > I hope this helps, > Hadrian > > [1] http://camel.apache.org/dynamic-router.html > [2] http://camel.apache.org/routing-slip.html > [3] http://camel.apache.org/direct.html > [4] http://camel.apache.org/seda.html > > On Oct 14, 2010, at 1:52 PM, serega wrote: &

Thanks

2010-10-14 Thread serega
Hi, thanks for the quick replies. The Dynamic Router is exactly what I need. Sergey. -- View this message in context: http://camel.465427.n5.nabble.com/Custom-Router-tp3212534p3212586.html Sent from the Camel - Users mailing list archive at Nabble.com.

Custom Router

2010-10-14 Thread serega
Camel documentation shows how to implement http://camel.apache.org/message-router.html Message Router pattern . In my case the given examples are not sufficient. I have tens, and may be hundreds of out endpoints, and complicated routing logic that is dynamic and can change at runtime. The Proces

Re: ThreadPoolExecutor configuration

2010-10-12 Thread serega
Claus Ibsen-2 wrote: > > Hi > > The problem is that you are using 0 as the pool size. > .threads(0) > > If you use 1 or larger it should work > Yes. I tried with threads(1) and it worked. But if I use pool size greater then 0, I cannot get SynchronousQueue. http://svn.apache.org/viewvc/c

ThreadPoolExecutor configuration

2010-10-11 Thread serega
Hi. Here is the scenario: public static void main(String[] args) throws Exception { BasicConfigurator.configure(); CamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { public void configure() throws Exception {