Re: Deprecating TestNG?

2016-10-18 Thread Giorgio Vespucci
Hi Claus? May I know why you're deprecating TestNG? Do you think it has no future? Is it stuck in development? Thank you Il mar 18 ott 2016, 22:38 Claus Ibsen ha scritto: > Hi > > Its deprecated from Camel 2.18 onwards, but will stay there in 2.x. > > From Camel 3.x

RE: send same message to multiple, not all, websocket clients

2016-10-18 Thread shemeem . sp
Hi Mark, you have to keep connection keys from each client in a map or list, then you need to send same data to the producer with different connection key. here is how you can get the connection key from each client. whenever a client makes a connection with your websocket consumer you

Re: Is netty4 disconnect/reconnect notification possible?

2016-10-18 Thread Steve973
Thanks, Claus. One Camel message mapping to one netty message is quite fine, but it needs to keep a persistent TCP connection for our purposes. We have to send something akin to a "hello" packet that lets the server at the TCP destination know what kind of data it will be receiving, and other

RE: [camel-ftp] Can't catch Invalid SFTP port exception

2016-10-18 Thread Goyal, Arpit
Thanks Claus for the clarification. If you are able to recall and point me to the fix, that would be great. I would like to understand. -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Tuesday, October 18, 2016 1:54 PM To: users@camel.apache.org Subject: Re:

Re: Camel Mail: Sending both text and html version of e-mail

2016-10-18 Thread Claus Ibsen
Hi See the alternativeBodyHeader option at http://camel.apache.org/mail.html On Thu, Oct 13, 2016 at 8:33 PM, dash wrote: > Hello. > I need to send both /text/html/ and /text/plain/ versions in one email. Can > this be done using Camel SMTP component? > > > > -- > View

Re: [camel-ftp] Can't catch Invalid SFTP port exception

2016-10-18 Thread Claus Ibsen
Try with Camel 2.18.0 release. We may have fixed something about this. There is a vague memory of mine looking into and fixing something with consumer template and bridge. On Sun, Oct 16, 2016 at 9:54 PM, Goyal, Arpit wrote: > I am trying to handle all the exception use

Re: Clarify why lazy-loaded component mapping files are properties files that aren't labeled as such

2016-10-18 Thread Claus Ibsen
Hi Welcome to the Camel community. Those files are for Camel component developers. The file is used for component discovery so Camel can automatic find components from the classpath. As a Camel *end user* you should not use those files. Instead if you want to configure Camel components / routes

Re: Apace Camel : Custom Redelivery Policy

2016-10-18 Thread Claus Ibsen
You can use onWhen on an onException where the onWhen is a predicate to determine if that onException should trigger or not. Some details here http://camel.apache.org/exception-clause.html If you have a copy of Camel in Action book this is covered much more in details in that book, as it has a

Re: Migrating issue from 2.10 to 2.17

2016-10-18 Thread Claus Ibsen
Hi That is a big migration as there is many changes between 2.10 and 2.17. You can check all the release notes for all those releases and see if anything stand out. Also you dont show very much details what you are doing and what happens / goes wrong etc. On Tue, Oct 18, 2016 at 2:07 PM,

Re: send same message to multiple, not all, websocket clients

2016-10-18 Thread Claus Ibsen
Hi So ootb camel-websocket is either point to point or pub/sub. So if you need to send a point to point to more than one, but not all, then I think you need to make your own house keeping of those connection keys you want to send to, and then send to them one by one. On Tue, Oct 18, 2016 at

Re: Is netty4 disconnect/reconnect notification possible?

2016-10-18 Thread Claus Ibsen
I think you would need to implement some custom codec or something to deal with this kind of requirements. The out of the box behavior is to use netty for messaging like where each Camel message maps to one netty message being sent over the wire. On Tue, Oct 18, 2016 at 7:29 PM, Steve973

Re: serviceCall with exchangeProperty in URI

2016-10-18 Thread Claus Ibsen
Its better to provide dynamic query parameters as a Exchange.HTTP_QUERY header then you reuse same endpoint. So you can set a HTTP_QUERY header with the value clientId= where xxx is the client id you want, which you can get from an exchange property. .setHeader(Exchange.HTTP_QUERY,

Re: serviceCall: must be configured before it can be used

2016-10-18 Thread Claus Ibsen
Also mind its maybe easier and more understandable to configure service call outside the route on a global level. However the unit test embeds the configuring inside the route. On Tue, Oct 18, 2016 at 10:39 PM, Claus Ibsen wrote: > You need to configure service call

Re: serviceCall: must be configured before it can be used

2016-10-18 Thread Claus Ibsen
You need to configure service call which registry to use, such as consul. There is a little unit test here https://github.com/apache/camel/blob/master/components/camel-consul/src/test/java/org/apache/camel/component/consul/processor/remote/ConsulServiceCallRouteTest.java On Tue, Oct 18, 2016 at

Re: Deprecating TestNG?

2016-10-18 Thread Claus Ibsen
Hi Its deprecated from Camel 2.18 onwards, but will stay there in 2.x. >From Camel 3.x onwards we will removed deprecated stuff from 2.x. On Tue, Oct 18, 2016 at 9:36 PM, Goyal, Arpit wrote: > Hi Claus, > > Heard your JDKIO Video 2016 (online) mentioning that TestNG

Deprecating TestNG?

2016-10-18 Thread Goyal, Arpit
Hi Claus, Heard your JDKIO Video 2016 (online) mentioning that TestNG support would be deprecated. Is there a timeline when you would deprecate and is there a possibility of removal (I presume 3.x?) Just wanted to know because we are currently using TestNG and want to have brief idea as to

Re: Camel - Making parallel GET requests and aggregating the results via Dynamic Routes using Java DSL

2016-10-18 Thread Debraj Manna
Thanks Avnish. On Tue, Oct 18, 2016 at 8:38 PM, Avnish Pundir wrote: > You can use JsonPathExpression in your split body and allow parallel > execution using executorServiceRef, following is a sample skeleton - > > from("jetty:http://localhost:/hello;).split(new

serviceCall: must be configured before it can be used

2016-10-18 Thread ValeryN
Hello, I'm trying to use serviceCall (introduced in 2.18 version) from Spring Boot app, consul as a service discovery tool. Here is an example: from("direct:test") .serviceCall("config-api") .log("${body}"); Both app

serviceCall with exchangeProperty in URI

2016-10-18 Thread ValeryN
Hello, Could you please give an example how to use a new serviceCall with dynamic URI parameter? Ideally from ${exchangeProperty.MY_PROPERTY} Wanna do something like that - serviceCall("http://my-service/api/v1/service?clientId=${exchangeProperty.clientId};) Using serviceCall because it supports

Is netty4 disconnect/reconnect notification possible?

2016-10-18 Thread Steve973
Hello. Our Camel route is sending messages to a netty4 tcp endpoint, but we need to make sure to send a particular type of message as the first message. If a disconnection happens during processing, we have to send this special message upon reconnection. Is this possible to achieve? Will we

Re: Send message to temporary queue

2016-10-18 Thread Quinn Stevenson
I don’t see where you’re using Camel in this snippet - am I missing something? What type of error are you seeing? > On Oct 14, 2016, at 5:16 AM, axdz wrote: > > Hi all, > > Follow this link > http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html

Re: Apace Camel : Custom Redelivery Policy

2016-10-18 Thread Quinn Stevenson
Is there a specific exception you can catch when the connection fails? If so, you could use onException to handle that case. onException(ConnectException.class).maximumRedeliveries(3).handled(true).to(jms:dlc) Something like the above should handle #1. > On Oct 18, 2016, at 2:38 AM,

RE: [camel-ftp] Can't catch Invalid SFTP port exception

2016-10-18 Thread Goyal, Arpit
Yes - it is part of the URL in the below code and it didn't work - I am more and more inclined there is some bug here; but not an expert. "consumer.bridgeErrorHandler=true&" Regards, Arpit. -Original Message- From: Quinn Stevenson [mailto:qu...@pronoia-solutions.com] Sent: Tuesday,

Re: apache camel returns statusCode:500

2016-10-18 Thread Avnish Pundir
Looks like your web-service is expecting special headers (either content type or something alike), you can try setting the content type and also set the request type to POST explicitly (in one of the peculiar use case I had to use it explicitly) using following code:

Re: [camel-ftp] Can't catch Invalid SFTP port exception

2016-10-18 Thread Quinn Stevenson
Have you tried enabling the bridge error handler feature (consumer.bridgeErrorHandler)? http://camel.apache.org/file2.html > On Oct 18, 2016, at 7:33 AM, Goyal, Arpit wrote: > > Anyone having idea about what's wrong here? > > Sent

Re: Camel - Making parallel GET requests and aggregating the results via Dynamic Routes using Java DSL

2016-10-18 Thread Avnish Pundir
You can use JsonPathExpression in your split body and allow parallel execution using executorServiceRef, following is a sample skeleton - from("jetty:http://localhost:/hello;).split(new JsonPathExpression("$.data[*]")).executorServiceRef(MY_EXECUTOR_REF).to(...) This will run your

CamelBlueprintTestSupport errors out when the blueprint has a custom threadpool

2016-10-18 Thread rw83
Sample of my blueprint is attached here. http://camel.apache.org/schema/blueprint;> Scheduler

send same message to multiple, not all, websocket clients

2016-10-18 Thread Mark
I am receiving messages of data that I am processing with Camel, similar to a chat system. Clients may "subscribe" to the data feed which will require me to send the messages to the clients that subscribe to that message type over websockets. How can I implement this websocket communication

Re: Choice Based On Pojo in Exchange

2016-10-18 Thread Claus Ibsen
You can use simple, mvel, ognl, groovy as the language to build that predicate http://camel.apache.org/languages For example with simple when(simple("${body.isErrors().size()} < 1")) On Tue, Oct 18, 2016 at 3:53 PM, spurcell wrote: > Hello Team, > > I have a

Choice Based On Pojo in Exchange

2016-10-18 Thread spurcell
Hello Team, I have a Pojo in my exchange, and the pojo has a List that may be empty or may have 0..* errors. I would like to create a .choice() based upon the size of the errors list. Is this possible? I see that I can use header and body in the choice, but not sure if the pojo will work. Can

Re: [camel-ftp] Can't catch Invalid SFTP port exception

2016-10-18 Thread Goyal, Arpit
Anyone having idea about what's wrong here? Sent from my iPhone > On Oct 16, 2016, at 12:55 PM, Goyal, Arpit wrote: > > I am trying to handle all the exception use cases of SFTP for logging > purposes. In case user has given invalid Port address for sftp server even >

Migrating issue from 2.10 to 2.17

2016-10-18 Thread Alexander Vladimirov
Hello camel users, I an trying to migrate camel to 2.17. I am using multiple camel contexts and some of them are used as integration. Which means referring context 1 and routing the message to context to. When I am trying to initialize them I receive ResolveEndpointFailedException. I am trying

Camel - Making parallel GET requests and aggregating the results via Dynamic Routes using Java DSL

2016-10-18 Thread Debraj Manna
I am receiving a request on a Jetty Http Endpoint. The request body contains some urls in the request body. I have to make a GET request to those urls. Then aggregate the results from each of the GET request and return it to the caller. Request Body:- { "data" : [ {"name" : "Hello",

Apace Camel : Custom Redelivery Policy

2016-10-18 Thread Shabin5785
I have a route that calls an external rest service. I have configured my error handler as shown below. errorHandler(deadLetterChannel("jms:dlc").maximumRedeliveries(3)); What i want to do: 1) If connection to external api fails, i want to retry 3 times and then send to deadLetterChannel 2) If

apache camel returns statusCode:500

2016-10-18 Thread meng
Hi All, I'm the new of camel. I now use apache camel to call several our webservices. Here is my code: public void configure() throws Exception{ from("direct:start") .marshal() .string(UTF_8) .to(TARGET http)