Re: Camel SQL

2016-10-12 Thread fabryprog
If you execute your query using alias (count(*) as c) you can use simple EL. http://camel.apache.org/simple.html The query result is into body input message For example: *${body[c]}*. It is a list of hashmap object. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-

HTTP keeps retrying after maximumRedeliveries set

2016-10-12 Thread ValeryN
Hello, Could you please advise why automatic retries happen even if I set maximumRedeliveries to 0? Basically I just want to disable retries. And also, how do I print HTTP response body in case it’s an error code? ${exception} only has a short description that HTTP call to my URL failed with er

Re: How to consume remote rest url and how to write given json response in a text file.

2016-10-12 Thread Tomohisa Igarashi
You can pass the HTTP parameters dynamically via Exchange.HTTP_QUERY message header. http://camel.apache.org/http.html On 10/12/2016 09:55 PM, Gunjara wrote: Hi Tomohisa Igarashi, Thanks for your reply. I need to pass parameters dynamically like http://yourhost.domain/path/to/rest/resource/prod

Re: Camel Spring Unit Testing with Mocks

2016-10-12 Thread Tomohisa Igarashi
First, is this the recommended way to do this type of test? I don't know the "official words", but it's used in official unit tests and also introduced in Camel in Action. Second, can the createRouteBuilder be the one in the actual prod route or do I have to copy my prod route into it? You

Re: Camel Spring Unit Testing with Mocks

2016-10-12 Thread Minh Tran
Hi I had this same issue too when I started looking into unit testing in camel. The mocks in camel aren’t really like mocks that comes with libraries such as Mockito. Those mocks actually replace the interface in which it mocks. Whereas the mocks in camel act more like proxies to the endpoints.

RE: How to consume remote rest url and how to write given json response in a text file.

2016-10-12 Thread Goyal, Arpit
See this FAQ about dynamic to http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html Clause pointed out recently. We used 'toD' from 2.16.3 version and tested camel-http component which works. So the dynamic part like product id or date could be headers, properties etc set by processor b

Re: camel-kafka Consumer to stop reading new messages and process only inflight messages.

2016-10-12 Thread Claus Ibsen
See about graceful shutdown http://camel.apache.org/graceful-shutdown.html On Wed, Oct 12, 2016 at 4:59 PM, Leo Prince wrote: > Hi Camel Users, > > We are using camel-kafka consumer to read message from Kafka.While > performing Production deployment we kill this Java project and install a new >

Re: Possible to identify previous step & configuration?

2016-10-12 Thread Claus Ibsen
Yes see the message history EIP http://camel.apache.org/eip On Wed, Oct 12, 2016 at 7:02 PM, Goyal, Arpit wrote: > Hi Colleagues, > > We have the following route. Is it possible in 'MyPostProcessor' to get the > information of the previous step - toD in this case, but it could be > different in

Re: CxfEndpoint soap client usernametoken authentication

2016-10-12 Thread dmitriyC300
There is a section on http://cxf.apache.org/docs/ws-security.html that defines how to handle plain text username/password. 1. Add WSS4JOutInterceptor to you CXF endpoint out interceptors with following configuration options: props.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);

Re: Possible to identify previous step & configuration?

2016-10-12 Thread fabryprog
Yes, it is possible but into your steps you must use exchange properties. Input Message and Output Message are designed to change values into every step / processor. -- View this message in context: http://camel.465427.n5.nabble.com/Possible-to-identify-previous-step-configuration-tp5788697p5

Possible to identify previous step & configuration?

2016-10-12 Thread Goyal, Arpit
Hi Colleagues, We have the following route. Is it possible in 'MyPostProcessor' to get the information of the previous step - toD in this case, but it could be different in different case. from("direct:begin") .process(new MyInboundProcessor()) .process(new MyTransformer()) .toD("") .proces

Re: ognl issue w/ list expression & spring boot?

2016-10-12 Thread dmitriyC300
will do -- View this message in context: http://camel.465427.n5.nabble.com/ognl-issue-w-list-expression-spring-boot-tp5788692p5788696.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ognl issue w/ list expression & spring boot?

2016-10-12 Thread Claus Ibsen
Yes if you can build a sample unit tests / sample project that can demonstrate this to help fix the bug. On Wed, Oct 12, 2016 at 4:28 PM, dmitriyC300 wrote: > It appears that there may be a conflict running simple expression w/ List > under spring boot. SpringTypeConverter is registered as a fal

camel-kafka Consumer to stop reading new messages and process only inflight messages.

2016-10-12 Thread Leo Prince
Hi Camel Users, We are using camel-kafka consumer to read message from Kafka.While performing Production deployment we kill this Java project and install a new jar. We use systemctl to manage java processes. While doing systemctl stop {java_process) I assume the inflight messages are lost. In came

ognl issue w/ list expression & spring boot?

2016-10-12 Thread dmitriyC300
It appears that there may be a conflict running simple expression w/ List under spring boot. SpringTypeConverter is registered as a fallback converter which gets picked up during ognl while attempting to convert list -> map causing an exception instead of a null response that is expected. It is h

Re: MockEndpoint can either returnReplyBody or returnReplyHeader not both

2016-10-12 Thread Claus Ibsen
There is a whenAnyExchangeReceived / whenExchangeReceived you can use with a processor where you can change the exchange as you like On Wed, Oct 12, 2016 at 3:49 PM, Damage_Shadow wrote: > Is there any way to return whole message with body and headers in case of > mocked endpoint org.apache.camel

Re: Camel Tracer and Logstash

2016-10-12 Thread Karts
In case anyone needs it, we used grok to achieve this: if [path] =~ "Tracer" { grok { patterns_dir => ["./extra_patterns"] match => { "message" => "^\n%{USERNAME:id} >>> \(%{USERNAME:routeId}\) %{GREEDYDATA:source} --> %{GREEDYDATA:de

MockEndpoint can either returnReplyBody or returnReplyHeader not both

2016-10-12 Thread Damage_Shadow
Is there any way to return whole message with body and headers in case of mocked endpoint org.apache.camel.component.mock.MockEndpoint. I can see only /** * Set the expression which value will be set to the message body * @param expression which is use to set the message body */

Re: How to consume remote rest url and how to write given json response in a text file.

2016-10-12 Thread Gunjara
Hi Tomohisa Igarashi, Thanks for your reply. I need to pass parameters dynamically like http://yourhost.domain/path/to/rest/resource/productid=1234&date=10122016 . How I can do that , please help me . If you have any sample git code plz send me. Regards, Gunjara -- View this message in contex

Re: Camel Spring Unit Testing with Mocks

2016-10-12 Thread Ryan Tracy
Tomo, That looks like what I am looking for.  Two questions.  First, is this the recommended way to do this type of test?Second, can the createRouteBuilder be the one in the actual prod route or do I have to copy my prod route into it? Ryan Sent from Yahoo Mail on Android On Wed, Oct 12, 20

Re: How to consume remote rest url and how to write given json response in a text file.

2016-10-12 Thread Tomohisa Igarashi
Is .to("http://yourhost.domain/path/to/rest/resource";).to("file:outputDir") insufficient for you? On 10/12/2016 05:28 PM, Gunjara wrote: Hi Any Body can help me on this. How to consume remote rest url and how to write given json response in a text file. like have Order ,Price endpoint urls a

How to consume remote rest url and how to write given json response in a text file.

2016-10-12 Thread Gunjara
Hi Any Body can help me on this. How to consume remote rest url and how to write given json response in a text file. like have Order ,Price endpoint urls are there i need to consume those urls ,take that into pojo and generated json in a text file. Regards, Gunjara -- View this message in