Re: Selector multiple field in header

2016-09-28 Thread Claus Ibsen
You can read about ActiveMQ selectors here: http://activemq.apache.org/selectors.html On Thu, Sep 29, 2016 at 4:53 AM, axdz wrote: > Hi all, > > I have a problem with selector activemq > > I have a queue with name A . I sent to this queue with some messages.All > these message have field a1,a2,a3

Re: Error in bindy documentation

2016-09-28 Thread Claus Ibsen
Or even better contribute yourself and provide a fix in the bindy.adoc as a github PR https://github.com/apache/camel/blob/master/components/camel-bindy/src/main/docs/bindy-dataformat.adoc How to contribute http://camel.apache.org/contributing The old wiki docs are going away. However how to edit

Selector multiple field in header

2016-09-28 Thread axdz
Hi all, I have a problem with selector activemq I have a queue with name A . I sent to this queue with some messages.All these message have field a1,a2,a3 in their header. I found solution for selector with one field as from("activemq:A?selector=a1='valuea1'").to("endpoint") Now,I want to

Re: kafka consumer error

2016-09-28 Thread sma
For anyone interested, it is the wrong version of sacla-library. -- View this message in context: http://camel.465427.n5.nabble.com/kafka-consumer-error-tp5788114p5788178.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Parse Json inside RecipientList

2016-09-28 Thread Brad Johnson
There are a number of ways but perhaps the simplest would be something like: .setHeader("customerId","${body.id}") right before the marshaling. Then in the http statement where the ID goes you can fish it out of the header with something like ${header.customerId}. I wrote all that free hand jus

Re: Error in bindy documentation

2016-09-28 Thread Charles Moulliard
Hi, Can you open a ticket please to report such enhancement ? Regards, On Wed, Sep 28, 2016 at 7:29 PM, Knut-Håvard Aksnes wrote: > Between 2.15 and 2.16 there were made a couple of backwards incompatible > changes in Bindy. > The first: The change in the constructor of CsvDataformat is well >

Re: Parse Json inside RecipientList

2016-09-28 Thread Shabin5785
sparekh wrote > If the jms message is a serialized POJO then you can use the Camel OGNL > expression to grab the id via body.id before marshalling it to JSON. > > Thanks, > sparekh Message is a serialized pojo. If i extract the id before marshalling, how can i hand it over to the next stage? -

Re: file2 include regex not reading files from ftpserver

2016-09-28 Thread sc
Used GenericFileFilter and it worked just fine. Just adding it here incase anyone wants to refer public class AFilter implements GenericFileFilter { private String patternFormat; private Pattern pattern; private Matcher matcher; public AFilter(String patternForma

Re: Camel-FTP and Docker

2016-09-28 Thread souciance
Can you download the file via ftp manually inside the docker container? Den 28 sep. 2016 4:18 em skrev "sparekh [via Camel]" < ml-node+s465427n5788160...@n5.nabble.com>: > That's what confusing to me, its a public ftp server, just an anonymous > login: > > Camel can successfully log in and find t

Re: Parse Json inside RecipientList

2016-09-28 Thread Brad Johnson
To amplify on sparekh's answer I think with a POJO you could simply use: "https4://x/api/customer/${body.id}" On Wed, Sep 28, 2016 at 11:49 AM, sparekh wrote: > How about a custom processor that parses the JSON string (via GSON) into a > JSON object and sets up the HTTP request and headers.

Error in bindy documentation

2016-09-28 Thread Knut-Håvard Aksnes
Between 2.15 and 2.16 there were made a couple of backwards incompatible changes in Bindy. The first: The change in the constructor of CsvDataformat is well documented. The second: The change in return type of unmarshal from List> to List is not documented in http://camel.apache.org/bindy.html

Re: Help with JSON to POJO using XML Routes

2016-09-28 Thread Brad Johnson
I didn't see in your initial code anything that set up the dataFormat. That along with the unmarsal/marshal are what you need to get it to work correctly, not just using a bean. Then in your route, right after your call* to* http4 you put: On Wed, Sep 28, 2016 at 11:56 AM, Brad

Re: Camel-FTP and Docker

2016-09-28 Thread sparekh
I figured out the issue, I had to set the passiveMode=true in my FTP config after using curl in verbose inside the container. Not sure why it works with active mode (enabled by default) in host OS but not in docker. Thanks, sparekh -- View this message in context: http://camel.465427.n5.nabble

Re: Help with JSON to POJO using XML Routes

2016-09-28 Thread Brad Johnson
Jackson works fine and I've used it many times. So does JAXB for JSON. Just remember to put the @XmlRootElement annotation on your bean in that case (yeah, even it if is only being used for JSON). I really wouldn't fool with the gapping of strings to a hashmap. You'll just create headaches. You ca

Re: Parse Json inside RecipientList

2016-09-28 Thread sparekh
How about a custom processor that parses the JSON string (via GSON) into a JSON object and sets up the HTTP request and headers. I don't believe you can use JsonPath to extract values, just choice or filter them. The custom processor would translate String -> JSON Object, extract the id from JSON

Re: Loop should continue after exception caught.

2016-09-28 Thread ptatTransamerica
It was breaking the loop. But I found a bug in my code that resolved the issue. However, that was useful tip. Thank you for your time :). -- View this message in context: http://camel.465427.n5.nabble.com/Loop-should-continue-after-exception-caught-tp5787979p5788163.html Sent from the Camel -

Re: Camel-FTP and Docker

2016-09-28 Thread sparekh
That's what confusing to me, its a public ftp server, just an anonymous login: Camel can successfully log in and find the file for download, even on TRACE I can't get an exact error thats causing the download to fail: ... [ main] FtpOperations TRACE Connec

Parse Json inside RecipientList

2016-09-28 Thread Shabin5785
Hi, I have a message received as Json. Logging the message body gives me below value (example) { "id":22, "type":"edit"} I need to invoke a rest api which needs the id value from the above json to be included. Api end point is like http://x/api/customer/, where id is the value above. I confi

Re: Loop should continue after exception caught.

2016-09-28 Thread DariusX
Do you find it is always breaking out of the loop or never breaking out? When I try the following code, the loop continues after being caught, unless I set the "CamelRouteStop" property, as shown below. from("direct:loopTest") .loop(simple("${body.size}")) .doTry()

Re: Help with JSON to POJO using XML Routes

2016-09-28 Thread jeffz
That's actually how it originally was, but I changed it while working on my older 'stream closed' issue. I can switch that back. I'm actually pretty close now, just running into some issues reading certain fields within the map object. -- View this message in context: http://camel.465427.n5.n

Re: Help with JSON to POJO using XML Routes

2016-09-28 Thread DariusX
As Ranx mentioned, shouldn't the http4 component be a producer rather than a consumer? (to rather than from?) i.e. <*to * uri="http4://{{url}}"/> Ranx wrote > ... your route is receiving it (from) but that is followed by another > (from) which would sit and wait for someone to call it. That do

camel-rabbitmq multiple bindings/routing keys

2016-09-28 Thread souciance
Hello, Does the camel-rabbitmq component support multiple bindings on a queue? That is, can a route consume a rabbit endpoint from(rabbitmq://...) and subscribe to a queue with multiple routing keys? It is supported by standard rabbitmq but wondering if the Camel component supports it as well. Si

Component-Jgroups tcp

2016-09-28 Thread R12
Hi everyone, I have managed to configure the jgroups using UDP to send msg to two other camel instances. *Question* However, I am not sure how to configure the jgroups using TCP. The objective is to send msg to one of the camel instances. Can camel jgroups component support TCP? I