Re: Multicast with two endpoints when request to the second depends on the response from the first one

2013-08-06 Thread Claus Ibsen
Christian is right - the multicast EIP is not sutiable here. See for example the content enricher eip. On Tue, Aug 6, 2013 at 9:56 PM, mateo wrote: > But to create request for ENDPOINT2 I need two things: original request (the > one which was on Exchange while entering multicast) and response fro

Re: Dynamic xsl with custom uri resolver

2013-08-06 Thread Claus Ibsen
The CamelXsltResourceUri header is *only* for the location of the xls file. Any other options like a custom resolver must be set on the endpoint / component level. On Tue, Aug 6, 2013 at 8:39 PM, ericsodt wrote: > Claus, > > The question I am asking is not one that can be resolved by the FAQ you

Re: Router with DSL

2013-08-06 Thread Christian Müller
Yes. Best, Christian Am 07.08.2013 01:47 schrieb "pannereselvam" : > Thanks boday... > > can multiple context exists in same single container? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Router-with-DSL-tp5736817p5736865.html > Sent from the Camel - Users mailin

Re: Always got IndexOutOfBoundsException when customized id of wireTap component

2013-08-06 Thread liugang594 Liu
Hi Willem: Welcome back. And I'll re-try after the fix. Thanks. 2013/8/7 Willem jiang > It's a bug of Camel. > I can reproduce the error in the camel trunk and will dig it later today. > > > -- > Willem Jiang > > Red Hat, Inc. > FuseSource is now part of Red Hat > Web: http://www.fusesource.

Re: Always got IndexOutOfBoundsException when customized id of wireTap component

2013-08-06 Thread Willem jiang
It's a bug of Camel. I can reproduce the error in the camel trunk and will dig it later today. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (Engli

Always got IndexOutOfBoundsException when customized id of wireTap component

2013-08-06 Thread liugang594 Liu
Hi All: When I'm tring to execute below route: from("timer:foo").wireTap("direct:a").id("wiretap_1").to("log:a"); from("direct:a").to("log:b"); I always got IndexOutOfBoundsException: Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: -1 at java.util.Collections$EmptyList.g

Re: Flatpack and aggregation

2013-08-06 Thread saltnlight5
Hello Tom, I think you can try flatpack with one of the idempotent consumer (http://camel.apache.org/idempotent-consumer.html) to eliminate duplicated messages. For example, maybe something like this: from("file:inbox") .to("flatpack:fixed:yourdata.pzmap.xml") .filter(header("action_id"

Re: Multicast with two endpoints when request to the second depends on the response from the first one

2013-08-06 Thread Willem jiang
Hi I think you can just define the route like this. from("xxx") .to(ENDPOINT1) .process("prepare request") .to(ENDPOINT2) -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://wille

Re: MojoExecutionException -Unmarshalling from XML

2013-08-06 Thread Willem jiang
Hi, It looks like there are more than one version of camel jars in you class path. Can you double check it by running mvn dependency:tree? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot

Re: exchange get in () and get out()

2013-08-06 Thread Willem jiang
Hi, Here is a wiki page[1] which explains it. [1]http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willem

MojoExecutionException -Unmarshalling from XML

2013-08-06 Thread milltj
Hey everyone, I am in the process of learning how to route with Camel and am having an issue with unmarshalling a Jaxb message. The scenerio is such that I have a processor bean that is intended to process the data after the XML has been unmarshalled. I put a jaxb.index file in the com.mycompany.

exchange get in () and get out()

2013-08-06 Thread pannereselvam
I have seen some time the same getin() message deliver the message without getout(). when actually use getout. Need some scenarios. -- View this message in context: http://camel.465427.n5.nabble.com/exchange-get-in-and-get-out-tp5736866.html Sent from the Camel - Users mailing list archive at

Re: Router with DSL

2013-08-06 Thread pannereselvam
Thanks boday... can multiple context exists in same single container? -- View this message in context: http://camel.465427.n5.nabble.com/Router-with-DSL-tp5736817p5736865.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dynamic xsl with custom uri resolver

2013-08-06 Thread ericsodt
Claus, The question I am asking is not one that can be resolved by the FAQ you pointed to. I notice this question gets posted a lot and no one seems to be fully answering it. Here's my go at it: The Camel xslt docs mention "Dynamic Stylesheets" by saying the following: /*Available as of Camel 2

Re: Multicast with two endpoints when request to the second depends on the response from the first one

2013-08-06 Thread mateo
But to create request for ENDPOINT2 I need two things: original request (the one which was on Exchange while entering multicast) and response from ENDPOINT1. And doing this in proposed way I will lost request information (in Exchange in out there will be only response from ENDPOINT1). -- View th

Re: Router with DSL

2013-08-06 Thread boday
sure, assuming you are bootstrapping the contexts with Spring, just include multiple camel-context.xml files (or add multiple contexts to a single file) and make sure you give the contexts explicit bean IDs so they can be referenced later... pannereselvam wrote > Thanks boday... > > can multiple

Re: Multicast with two endpoints when request to the second depends on the response from the first one

2013-08-06 Thread Christian Posta
You don't need multicast for this. Just use to(endpoint).to(endpoint) On Tue, Aug 6, 2013 at 8:45 AM, mateo wrote: > Hi all, > > I need to send synchronously two different messages to two different > endpoints but before I can create second request I need first get response > from the first

Re: ActiveMQ composite destination producer

2013-08-06 Thread Christian Posta
ActiveMQ producers cannot produce to composite destinations. May be interested in using Camel's multicast component to accomplish this. On Tue, Aug 6, 2013 at 9:03 AM, Marco Crivellaro wrote: > Hi All, > I have a requirement to send the same message to 2 distinct destinations (a > queue and a to

ActiveMQ composite destination producer

2013-08-06 Thread Marco Crivellaro
Hi All, I have a requirement to send the same message to 2 distinct destinations (a queue and a topic) on ActiveMQ and I would like to use the composite destination feature of ActiveMQ. http://activemq.apache.org/composite-destinations.html I've tried to setup the producer URI as follow: the m

Multicast with two endpoints when request to the second depends on the response from the first one

2013-08-06 Thread mateo
Hi all, I need to send synchronously two different messages to two different endpoints but before I can create second request I need first get response from the first endpoint. I have tried to use multicast pattern but there is separate exchange created for each outcome so I cannot communicate be

Re: Router with DSL

2013-08-06 Thread boday
#1 - yes, you can use both Spring XML to define routes and also include RouteBuilders that define JavaDSL routes via bean refs or packageScan (see http://camel.apache.org/spring.html) #2 - yes, you can use multiple Camel Contexts in any container pannereselvam wrote > Hi, we are new to camel. Ha

Re: The producer sent only one message but the comsumer received multiple messages with same content.

2013-08-06 Thread Christian Müller
Good to know you could solve the problem. Best, Christian Am 06.08.2013 16:56 schrieb "Nhan Nguyen" : > Thanks for your reply! > > I find out the reason: I used a topic and set the > maximumConcurrrentConsumer > = 10. This is really not recommended. I read some documents about the > concurrent co

Re: The producer sent only one message but the comsumer received multiple messages with same content.

2013-08-06 Thread Nhan Nguyen
Thanks for your reply! I find out the reason: I used a topic and set the maximumConcurrrentConsumer = 10. This is really not recommended. I read some documents about the concurrent consumer and see that we should only set the concurrentconsumer if we are using a queue. I also find out another dis

Re: Unit of Work Scope and direct/SEDA/vm components

2013-08-06 Thread Scott Parkerson
Bilgin, Thank you -- that's what I expected, so I'll give using a JMS queue a try. --sgp On Mon, Aug 5, 2013 at 2:45 PM, Bilgin Ibryam wrote: > Hi, > The file component uses onCompletion for moving files after the exchange > has completed. As long as the completions are passed with the exchan

Re: The producer sent only one message but the comsumer received multiple messages with same content.

2013-08-06 Thread John D. Ament
Since you have activemq, can you try it with the activemq component rather than the JMS component? Can you share more of your example, the problem is that it doesn't compile. I put together a simple example as well that demos this, but doesn't reproduce your error. I'm wondering if somehow you'

Re: The producer sent only one message but the comsumer received multiple messages with same content.

2013-08-06 Thread Nhan Nguyen
I'm using Camel 2.11.0: org.apache.camel camel-core 2.11.0 org.apache.camel camel-jms 2.11.0 org.apache.camel camel-spring

Re: How to stop the Polling Consumer?

2013-08-06 Thread alexey-s
Hi, Claus. http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html Sample stop route after line "And in the route we create the thread and call the stopRoute method as shown:" is no correct. JavaDoc for method Thread start(): It is never legal to start a thread more than once. In parti

Re: pass input from queue to web service

2013-08-06 Thread boday
start with reading about CXF to wrap the web service interaction: http://camel.apache.org/cxf-example.html otherwise, checkout some CXF unit tests to see how to setup the necessary message information to invoke a web service http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/j

Re: camel - Activemq strange behaviour

2013-08-06 Thread Claus Ibsen
Hi Read the docs about jms request/reply On Tue, Aug 6, 2013 at 2:28 PM, kiranreddykasa wrote: > Hi > > I think I figure out the problem. > > Here is the scenario, > > 1 Start producers and consumers in server 1. > > 2 Send requests to first server, everything will be processed. > > 3 Start prod

pass input from queue to web service

2013-08-06 Thread Rajalakshmi Raman
I created a web service. I want to pass input from queue to web service . I dont know how to invoke web service using camel. -- View this message in context: http://camel.465427.n5.nabble.com/pass-input-from-queue-to-web-service-tp5736844.html Sent from the Camel - Users mailing list archive a

Re: camel - Activemq strange behaviour

2013-08-06 Thread kiranreddykasa
Hi I think I figure out the problem. Here is the scenario, 1 Start producers and consumers in server 1. 2 Send requests to first server, everything will be processed. 3 Start producers and consumers in server 2. 4 Send requests to first server, everything will be processed. But if we send r

Re: The producer sent only one message but the comsumer received multiple messages with same content.

2013-08-06 Thread Christian Müller
Which version of Camel do you use? Best, Christian Am 06.08.2013 12:30 schrieb "Nhan Nguyen" : > Can someone help me on this? > > Seem there is a problem with the processor when it is used with the Topic. > > Thanks, > Nhan > > > > -- > View this message in context: > http://camel.465427.n5.nabbl

Flatpack and aggregation

2013-08-06 Thread Tom.Fornoville
'm relatively new to Camel and guessing my problem can be solved with a combination of FlatPack and an aggregation but I'm not seeing how I can make it work without writing a lot of code. It starts with a fixed width file with 2 columns (actually more but only 2 are relevant): action_id and organi

Re: 2 JaxbDataFormat in the same route doesnt work

2013-08-06 Thread mikael_th
I found the error, It was not with the JaxbDataFormat, I had an error in the Converter class (only the class was annotated with @Converter not the method). I got fooled by the error message informing me that there was an error in unmarshalling. After adding the @Converter to the method name, the

Re: The producer sent only one message but the comsumer received multiple messages with same content.

2013-08-06 Thread Nhan Nguyen
Can someone help me on this? Seem there is a problem with the processor when it is used with the Topic. Thanks, Nhan -- View this message in context: http://camel.465427.n5.nabble.com/The-producer-sent-only-one-message-but-the-comsumer-received-multiple-messages-with-same-content-tp5736733p57

RE: Camel Performance

2013-08-06 Thread Zhemzhitsky Sergey
>> As for the JSON I have defined it in the data formats as followed Remove it from dataformats and define the following bean Then refer it as usual. Best Regards, Sergey -Original Message- From: salemi [mailto:sal...@avaya.com] Sent: Tuesday, August 06, 2013 1:21 PM To:

Re: camel - Activemq strange behaviour

2013-08-06 Thread kiranreddykasa
hi I tried setting prefetch limit to 1 , but still of no use. And according to link you have given , at least the first server's consumers should get the message right ?? No one is picking up the messages and timeout is happening. - Regards kiran Reddy -- View this message in context

RE: Camel Performance

2013-08-06 Thread salemi
As for the JSON I have defined it in the data formats as followed. How can configure it to use always the same objectmapper. I am not sure how the JaksonDataFormat plays into this. I will try the client_acknwoledge and post the results. I will take look at the individual routes and Clause has

Re: camel - Activemq strange behaviour

2013-08-06 Thread kiranreddykasa
Thanks Is this the way to set prefetch limit destination.consumer.prefetchSize=1 ? And it has to be set on producer only right ? - Regards kiran Reddy -- View this message in context: http://camel.465427.n5.nabble.com/camel-Activemq-strange-behaviour-tp5736812p5736820.html Sent from th

RE: Camel Performance

2013-08-06 Thread Zhemzhitsky Sergey
Take a look into the jmx stats. It provides performance statistics on the per-processor level. Identify what processor consumes more time. 1. Is the jms endpoint transacted? Marking the route as transacted does not make the endpoint transacted. If you'd like to consume messages in transactions

Router with DSL

2013-08-06 Thread pannereselvam
Hi, we are new to camel. Have Question 1: Reg DSL(java, Spring). Can we combine both DSL in same application. if yes how can we link if we want to connect these routers? Question 2: Can we configure two camel context in same mc and one a router from each context? Much appriciated your response a

Re: Camel Performance

2013-08-06 Thread Claus Ibsen
The predicates in your choice is using contains function which operates on String types. So if the toString operation of the message body is expensive, then optimize that. On Tue, Aug 6, 2013 at 7:28 AM, salemi wrote: > Hi, > > I was wondering how can improve the performance of the route below!

Re: camel - Activemq strange behaviour

2013-08-06 Thread Claus Ibsen
ActiveMQ clients have a prefetch buffer. Try setting the prefetch buffer to 0 or 1. You can find details about that on the AMQ site. http://activemq.apache.org/what-is-the-prefetch-limit-for.html http://activemq.apache.org/i-do-not-receive-messages-in-my-second-consumer.html A tip is to type pref

Re: 2 JaxbDataFormat in the same route doesnt work

2013-08-06 Thread Claus Ibsen
What Camel version do you use? On Mon, Aug 5, 2013 at 5:48 PM, mikael_th wrote: > Hello, > > I am trying to unmarshall an XML string to a JAXB object, convert this to > another JAXB object and then marshall this before I send it on a queue. > > The problem is that in the example below the unmarsh

Re: Camel route stop consuming

2013-08-06 Thread Claus Ibsen
The SEDA queues is purely in-memory, so if the server crashes etc then the messages is lost, that is expected. On Mon, Aug 5, 2013 at 10:34 PM, jaime.salvador wrote: > Hi, > > Nice to see a reply by you (I have a paper copy of Camel in Action, great > book!) > > The delay(500) is for spam preve

camel - Activemq strange behaviour

2013-08-06 Thread kiranreddykasa
Hi I'm trying to implement camel-activemq. Here is the route : from("netty:tcp://0.0.0.0:7000?textline=true") .bean(MainProcessor.class) .to("activemq:CAMEL_ONE_QUEUE?testConnectionOnStartup=true&replyTo=CAMEL_ONE_QUEUE_REP&replyT