Re: How to use simple expression in properties file?

2019-06-26 Thread Claus Ibsen
On Wed, Jun 26, 2019 at 11:49 PM Steve Huston wrote: > > Is it possible to put a simple() expression in a properties string and have > Camel evaluate it at run time? > > Here's what I'm trying to do: > - Set a message header ID with a value I want to use later > - Use .toD("{{event.sink}}") > > a

How to use simple expression in properties file?

2019-06-26 Thread Steve Huston
Is it possible to put a simple() expression in a properties string and have Camel evaluate it at run time? Here's what I'm trying to do: - Set a message header ID with a value I want to use later - Use .toD("{{event.sink}}") application.properties can then have something like: event.sink = simp

Process single file if destination location is empty

2019-06-26 Thread Bikash Kaushik
Hi, I am trying to write a process that will use a file endpoint to drop a single file to a directory. The file should be dropped when destination directory is empty otherwise endpoint will wait until destination directory gets empty. -- *Regards,* *Bikash Kaushik,* *NIT Jamshedpur*

Re: splitResults option shows unknown in google-sheets-stream component

2019-06-26 Thread Bikash Kaushik
In, Camel google sheet, maxResult option didn't work. And when I start my route, it continuosly do polling and do not stop after getting sheet body. Regards, Bikash Kaushik On Wed, Jun 26, 2019 at 8:53 AM Claus Ibsen wrote: > Hi > > Again make sure to align and use the same Camel version. You h

Re: How to unmarshal when you don't know what you're unmarshalling?

2019-06-26 Thread Ron Cecchini
Hi, Claus. Thanks for the response. Actually, I always do the following in my Route.configure(): getContext().setStreamCaching(true); (I do it by default now. I can't even remember when I *wouldn't* want to do it...) Anyway, even with stream caching on, the body is getting nulled out in th

Re: How to set client or clientFactory in the FhirConfiguration object?

2019-06-26 Thread John Poth
Hi Paw, I'm not sure why you're trying to set the custom IGenericClient through the Camel header; I'd need more info on your requirements. If you can link to a github project or whatnot that'd be great. As stated, you can set the custom client in your route URI directly [1] referencing your bean i

RE: How to set client or clientFactory in the FhirConfiguration object?

2019-06-26 Thread Paw B Sørensen
I still have problem setting my custom client in the FhirConfiguration. I have implemented a custom client TestClient implementing the IGenericClient interface and I annotated the class with @Component. I also implemented a route where I try to set my custom client using the following strategy

Re: JMS Transaction rollback with dead letter channel using Apache Camel

2019-06-26 Thread sujin sr
Hi, I have tried with OnException and doTry/doCatch error handler still I am getting the same behaviour as message sends to JMS_ONE. error handler java.lang.RuntimeException java.lang.IllegalArgumentException true

Re: Read header value in Camel xpath

2019-06-26 Thread Bikash Kaushik
Yes , thanks. On Wed, Jun 26, 2019, 1:37 PM Alex Dettinger wrote: > If I get it correctly, you may be interested in the "in:header" xpath > function: > > https://github.com/apache/camel/blob/master/components/camel-xpath/src/main/docs/xpath-language.adoc > > https://github.com/apache/camel/blob/

Re: Read header value in Camel xpath

2019-06-26 Thread Alex Dettinger
If I get it correctly, you may be interested in the "in:header" xpath function: https://github.com/apache/camel/blob/master/components/camel-xpath/src/main/docs/xpath-language.adoc https://github.com/apache/camel/blob/camel-2.24.x/camel-core/src/test/java/org/apache/camel/language/XPathFunctionTest

Re: JMS Transaction rollback with dead letter channel using Apache Camel

2019-06-26 Thread Claus Ibsen
Hi You are using dead letter channel as Camel's error handler which will mark the message as succesfull. Just use a regular error handler On Wed, Jun 26, 2019 at 9:50 AM sujin sr wrote: > > Thanks for the Response. > > Before implementing 'transacted JMS acknowledge' i have tried to create > sep

Re: JMS Transaction rollback with dead letter channel using Apache Camel

2019-06-26 Thread sujin sr
Thanks for the Response. Before implementing 'transacted JMS acknowledge' i have tried to create separate JMS component for ERROR. But still, I see the same behaviour as message sent to the JMS_ONE not rollbacked I have added this beans and changed ERROR route like below

Re: Read header value in Camel xpath

2019-06-26 Thread Bikash Kaushik
Hi, I want to use header value in xpath to filter message based on header value. On Wed, Jun 26, 2019, 12:46 PM Claus Ibsen wrote: > Hi > > What do you mean? > > Do you mean you need to use a Camel Message header to build your xpath > expression, or do you want from the xpath expression to refe

Re: JMS Transaction rollback with dead letter channel using Apache Camel

2019-06-26 Thread Claus Ibsen
On Wed, Jun 26, 2019 at 9:19 AM Zheng Feng wrote: > > It looks like you need the JTA transaction manager to handle a XA > transaction between the JMS_ONE and JMS_TWO. > That is only needed if ONE and TWO are 2 different JMS systems. If they are the same then local JMS transacted ack mode should b

Re: JMS Transaction rollback with dead letter channel using Apache Camel

2019-06-26 Thread Claus Ibsen
Hi Its likely better to use just the brokers error handling with transaction (transacted JMS acknowledge). Then you can configure the broker with redelivery and its dead letter queue. Then you dont need any Camel error handler, and only need to setup JMS component for transacted JMS ack mode. Oth

Re: JMS Transaction rollback with dead letter channel using Apache Camel

2019-06-26 Thread Zheng Feng
It looks like you need the JTA transaction manager to handle a XA transaction between the JMS_ONE and JMS_TWO. On Wed, Jun 26, 2019 at 3:01 PM sujin sr wrote: > I am facing a issue while trying to implement JMS transaction using Camel. > > Here is the scenario > > 1. Primary route which read the

Re: Read header value in Camel xpath

2019-06-26 Thread Claus Ibsen
Hi What do you mean? Do you mean you need to use a Camel Message header to build your xpath expression, or do you want from the xpath expression to refer to a Camel header. Its a bit unclear from your example. On Wed, Jun 26, 2019 at 8:45 AM Bikash Kaushik wrote: > > Hi, > > I want to know , ho

JMS Transaction rollback with dead letter channel using Apache Camel

2019-06-26 Thread sujin sr
I am facing a issue while trying to implement JMS transaction using Camel. Here is the scenario 1. Primary route which read the message from the queue(JMS_IN), pass the same exchange to the two sub route(direct route) 2. First sub route process the message successfully and send to the another que