RE: Camel-ahc-ws netty runtime problems

2016-10-28 Thread Ingram, Stuart
Thanks Claus!  I wasn't aware of the *-starter packages for Camel.  Much 
appreciated for the pointer.

Moving to the 'camel-ahc-ws-starter' package and adjusting all other camel* 
packages I now get a different exception. 

Any help/pointers are appreciated.  Thanks


java.util.concurrent.ExecutionException: java.lang.IllegalStateException: 
Invalid Status Code 404
at 
org.asynchttpclient.netty.NettyResponseFuture.done(NettyResponseFuture.java:228)
 ~[async-http-client-2.0.15.jar:na]
at 
org.asynchttpclient.netty.handler.WebSocketHandler$UpgradeCallback.call(WebSocketHandler.java:100)
 ~[async-http-client-2.0.15.jar:na]
at 
org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:73)
 ~[async-http-client-2.0.15.jar:na]
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
 ~[netty-codec-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
 ~[netty-codec-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611) 
~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
 ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466) 
~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) 
~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
 ~[netty-common-4.0.41.Final.jar:4.0.41.Final]
at 
io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
 ~[netty-common-4.0.41.Final.jar:4.0.41.Final]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
Caused by: java.lang.IllegalStateException: Invalid Status Code 404
at 
org.asynchttpclient.ws.WebSocketUpgradeHandler.onCompleted(WebSocketUpgradeHandler.java:81)
 ~[async-http-client-2.0.15.jar:na]
at 
org.asynchttpclient.ws.WebSocketUpgradeHandler.onCompleted(WebSocketUpgradeHandler.java:29)
 ~[async-http-client-2.0.15.jar:na]
at 
org.asynchttpclient.netty.NettyResponseFuture.getContent(NettyResponseFuture.java:188)
 ~[async-http-client-2.0.15.jar:na]
at 
org.asynchttpclient.netty.NettyResponseFuture.done(NettyResponseFuture.java:223)
 ~[async-http-client-2.0.15.jar:na]
... 24 common frames omitted

-Original Message-
From: Claus Ibsen [mailto:claus.ib...@gmail.com] 
Sent: Friday, October 28, 2016 3:20 AM
To: users@camel.apache.org
Subject: Re: Camel-ahc-ws netty 

Re: Question on multicast to pipelines

2016-10-28 Thread Edoardo Causarano
Hi Brad,

yes that's the definition of multicast but the documentation also suggests
that pipelines are supposed to be implicitly derived from a vararg to(...)
statement.

In any case I don't understand how the multicast could leak into a vararg
pipeline(...). It really feels like a bug to me, but I know little enough
of Camel to assume there's probably a good reason (in which case I'm happy
to understand it's logic)


Re: Question on multicast to pipelines

2016-10-28 Thread Edoardo Causarano
Hi Darius, that's correct, I'm expecting the START message to enter the
pipelines from their heads.

On Fri, 28 Oct 2016 at 20:43, DariusX  wrote:

> It isn't clear what you want as the expected output.
> From your example, it seems that you have two "pipelines" and you want to
> multicast to send the message down both pipelines.
> But, that's probably not what you really want.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Question-on-multicast-to-pipelines-tp5789396p5789416.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: smb cannot connect to server

2016-10-28 Thread Pontus Ullgren
Hi,

Looking into the source of the jcifs library (where the exception
originates) it seems that the root cause of the exception is
a UnknownHostException.

See the FAQ for the jcifs library (https://jcifs.samba.org/FAQ.html#ukhost).
Is the server address resolvable over DNS you can try changing the
resolveOrder property to first use DNS resolution (see the documentation
https://jcifs.samba.org/src/docs/resolver.html).

Best regards
Pontus Ullgren

On Fri, 28 Oct 2016 at 20:05 Peter J Nelson 
wrote:

> Camel: 2.16.3, camel-jcifs: 2.15.0 (latest)
>
> I am using jCIFS and attempting to connect to a remote share in a different
> domain.  I can connect to this share without issue using Windows Explorer
> (Win 7) and the UNC path.  I can also connect through Linux using smbclient
> (SuSE 11, samba-client-3.6.3-0.56.1) and mount it as -t cifs
> (cifs-utils-5.1-0.11.1).
>
> However, connecting to the share through camel's jcifs/smb component does
> not work on shares outside of the default domain.  I was initially using
> the
> smb://domain;username:password@fullyqualifiedhost/share/path .  This
> format
> worked fine for Windows shares within my default domain, but failed when
> trying to connect to a remote domain.
>
> I turned up logging to debug for "org.apacheextras.camel.component.jcifs",
> and found this when I'd try connecting:
>
> 10/28/2016 12:58:49 DEBUG [Camel (tritechProcessorContext) thread #0 -
> smb://rce_cad_rms_es.rc-ecc.org/StPaul/Out]
> org.apacheextras.camel.component.jcifs.DefaultSmbClient login()
> domain[null]
> username[null] password[***]
>
> From that, it appears as if the username & domain were not being sent.  I
> added these as query strings, and that seemed to fix THAT issue:
>
> 10/28/2016 13:03:12 DEBUG [Camel (tritechProcessorContext) thread #0 -
> smb://rce_cad_rms_es.rc-ecc.org/StPaul/Out]
> org.apacheextras.camel.component.jcifs.DefaultSmbClient login()
> domain[rc-ecc] username[testuser] password[***]
>
> However, it still cannot connect to that server:
>
> org.apache.camel.component.file.GenericFileOperationFailedException: Could
> not get files Failed to connect to server
> at
>
> org.apacheextras.camel.component.jcifs.SmbOperations.listFiles(SmbOperations.java:345)
> ~[camel-jcifs-2.15.0.jar:2.15.0]
> at
>
> org.apacheextras.camel.component.jcifs.SmbConsumer.pollDirectory(SmbConsumer.java:58)
> ~[camel-jcifs-2.15.0.jar:2.15.0]
> at
>
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:119)
> ~[camel-core-2.16.3.jar:2.16.3]
> at
>
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
> [camel-core-2.16.3.jar:2.16.3]
> at
>
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
> [camel-core-2.16.3.jar:2.16.3]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> [na:1.8.0_102]
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> [na:1.8.0_102]
> at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> [na:1.8.0_102]
> at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> [na:1.8.0_102]
> at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [na:1.8.0_102]
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [na:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
> Caused by: jcifs.smb.SmbException: Failed to connect to server
> at jcifs.smb.SmbFile.connect0(SmbFile.java:882)
> ~[jcifs-1.3.17.jar:na]
> at jcifs.smb.SmbFile.resolveDfs(SmbFile.java:669)
> ~[jcifs-1.3.17.jar:na]
> at jcifs.smb.SmbFile.send(SmbFile.java:773) ~[jcifs-1.3.17.jar:na]
> at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1986)
> ~[jcifs-1.3.17.jar:na]
> at jcifs.smb.SmbFile.doEnum(SmbFile.java:1738)
> ~[jcifs-1.3.17.jar:na]
> at jcifs.smb.SmbFile.listFiles(SmbFile.java:1715)
> ~[jcifs-1.3.17.jar:na]
> at jcifs.smb.SmbFile.listFiles(SmbFile.java:1648)
> ~[jcifs-1.3.17.jar:na]
> at
>
> org.apacheextras.camel.component.jcifs.DefaultSmbClient.listFiles(DefaultSmbClient.java:161)
> ~[camel-jcifs-2.15.0.jar:2.15.0]
> at
>
> org.apacheextras.camel.component.jcifs.SmbOperations.listFiles(SmbOperations.java:341)
> ~[camel-jcifs-2.15.0.jar:2.15.0]
> ... 11 common frames omitted
>
> What am I missing?  Does camel not fully support smb?
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/smb-cannot-connect-to-server-tp5789414.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Alternative to Spring Boot websocket/stomp support in OSGI

2016-10-28 Thread Brad Johnson
I'm not sure exactly what you're looking for here but will give it a shot.
If you use a  it should do what you are after.


amq:queue::${header.destinationVariable}


I don't know if that destinationVariable is what is in the header or if you
send another name.  But effectively that EIP is used to route without
having to use big choice statements. It may or may not be obvious but what
ever that destinationVariable is has to be the same name as the queue. The
queue can be in only or in out. The latter being request/response. On a
request/response there are two queues set up by Camel/Activemq under the
covers. To you it looks like a single queue that you send a request into
and get a request back.  In fact the queue is unidirectional so a second
queue is set up to route the message back to the caller.

I'm not sure if that's what you're after or not but it's a start.

On Fri, Oct 28, 2016 at 2:10 PM, markryder  wrote:

> Spring boot offers the capability to develop interactive web apps using
> websockets communication with a browser based client (JavaScript UI). The
> stomp protocol is used on websockets and then mapped to activemq queues or
> topics, allowing server side components to interact with a web client
> through the queues or topics and not through websockets. See spring boot
> page: https://spring.io/guides/gs/messaging-stomp-websocket/ for details.
> Normal JMS queues/topics on the server side are mapped to ‘N’ number of
> user specific websocket endpoints (see http://docs.spring.io/spring/d
> ocs/current/spring-framework-reference/html/websocket.html#w
> ebsocket-stomp-message-flow
> ).
>
> Camel seems to have all the necessary components to achieve the same thing:
> •AHC-WS – Camel websocket client
> •Atmosphere-websocket - websocket server
> •Websocket - websocket client/server
> •Stomp -  talks stomp to activemq broker
> but has nothing prebuilt and that handles the mappings between user
> stomp/websocket sessions and individual server side topics and queues.
> We are running in an OSGI container and need to duplicate the spring boot
> websocket (i.e. org.springframework.web.socket.messaging.*) capability
> but without spring due to the difficulties of supporting Spring Boot in
> OSGI. Can anyone suggest an existing example project or strategy to achieve
> this goal? This is a migration of an existing project and we must continue
> to support stomp on the websocket side.
>
>
>


Re: Problem: Concatenate the different input(from different route) using aggreagationStrategy

2016-10-28 Thread Steve973
Sorry...  I see what you are doing.  Which is line 19?

On Fri, Oct 28, 2016 at 3:32 PM, Steve973  wrote:

> There is no way that you can aggregate like that.  Both messages need to
> be sent to the same endpoint, and they need to have some sort of
> aggregation id in order for the aggregation to know which messages to
> combine.  Let me know if this is unclear or if you need more information.
>
> On Thu, Oct 27, 2016 at 7:06 PM, meng  wrote:
>
>> I change to  .aggregate(simple("${body}"), new
>> JoinReplyAggregationStrategy()), now no exceptions, but only returns the
>> second exchange from route 2. No original payload comes in to
>> aggregate
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.
>> com/Problem-Concatenate-the-different-input-from-different-
>> route-using-aggreagationStrategy-tp5789368p5789370.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>


Re: Problem: Concatenate the different input(from different route) using aggreagationStrategy

2016-10-28 Thread Steve973
There is no way that you can aggregate like that.  Both messages need to be
sent to the same endpoint, and they need to have some sort of aggregation
id in order for the aggregation to know which messages to combine.  Let me
know if this is unclear or if you need more information.

On Thu, Oct 27, 2016 at 7:06 PM, meng  wrote:

> I change to  .aggregate(simple("${body}"), new
> JoinReplyAggregationStrategy()), now no exceptions, but only returns the
> second exchange from route 2. No original payload comes in to aggregate
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Problem-Concatenate-the-different-input-from-different-route-using-
> aggreagationStrategy-tp5789368p5789370.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Alternative to Spring Boot websocket/stomp support in OSGI

2016-10-28 Thread markryder
Spring boot offers the capability to develop interactive web apps using 
websockets communication with a browser based client (JavaScript UI). 
The stomp protocol is used on websockets and then mapped to activemq 
queues or topics, allowing server side components to interact with a web 
client through the queues or topics and not through websockets. See 
spring boot page: https://spring.io/guides/gs/messaging-stomp-websocket/ 
for details. Normal JMS queues/topics on the server side are mapped to 
‘N’ number of user specific websocket endpoints (see 
http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html#websocket-stomp-message-flow

).

Camel seems to have all the necessary components to achieve the same thing:
•AHC-WS – Camel websocket client
•Atmosphere-websocket - websocket server
•Websocket - websocket client/server
•Stomp -  talks stomp to activemq broker
but has nothing prebuilt and that handles the mappings between user 
stomp/websocket sessions and individual server side topics and queues.
We are running in an OSGI container and need to duplicate the spring 
boot websocket (i.e. org.springframework.web.socket.messaging.*) 
capability but without spring due to the difficulties of supporting 
Spring Boot in OSGI. Can anyone suggest an existing example project or 
strategy to achieve this goal? This is a migration of an existing 
project and we must continue to support stomp on the websocket side.





Re: Question on multicast to pipelines

2016-10-28 Thread Brad Johnson
The multicast sends the same message to all the to or pipeline elements it
finds in its definition. That's why it is a "multicast".  What is it you
are trying to accomplish here and don't focus so much on the mechanics of
doing it.  Without knowing what your business case/problem definition is
it's hard to say what will work for you.

On Fri, Oct 28, 2016 at 1:42 PM, DariusX  wrote:

> It isn't clear what you want as the expected output.
> From your example, it seems that you have two "pipelines" and you want to
> multicast to send the message down both pipelines.
> But, that's probably not what you really want.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Question-on-multicast-to-pipelines-tp5789396p5789416.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Question on multicast to pipelines

2016-10-28 Thread DariusX
It isn't clear what you want as the expected output. 
>From your example, it seems that you have two "pipelines" and you want to
multicast to send the message down both pipelines. 
But, that's probably not what you really want.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Question-on-multicast-to-pipelines-tp5789396p5789416.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Using metrics publisher with camel-hysterix

2016-10-28 Thread Debraj Manna
Can someone let me know if it is possible to use metrics-publisher

 with camel-hysterix ? My
intention is to publish metrics to Graphite.

I am using camel 2.18.0.


smb cannot connect to server

2016-10-28 Thread Peter J Nelson
Camel: 2.16.3, camel-jcifs: 2.15.0 (latest)
 
I am using jCIFS and attempting to connect to a remote share in a different
domain.  I can connect to this share without issue using Windows Explorer
(Win 7) and the UNC path.  I can also connect through Linux using smbclient
(SuSE 11, samba-client-3.6.3-0.56.1) and mount it as -t cifs
(cifs-utils-5.1-0.11.1).

However, connecting to the share through camel's jcifs/smb component does
not work on shares outside of the default domain.  I was initially using the
smb://domain;username:password@fullyqualifiedhost/share/path .  This format
worked fine for Windows shares within my default domain, but failed when
trying to connect to a remote domain.

I turned up logging to debug for "org.apacheextras.camel.component.jcifs",
and found this when I'd try connecting:

10/28/2016 12:58:49 DEBUG [Camel (tritechProcessorContext) thread #0 -
smb://rce_cad_rms_es.rc-ecc.org/StPaul/Out]
org.apacheextras.camel.component.jcifs.DefaultSmbClient login() domain[null]
username[null] password[***]

>From that, it appears as if the username & domain were not being sent.  I
added these as query strings, and that seemed to fix THAT issue:

10/28/2016 13:03:12 DEBUG [Camel (tritechProcessorContext) thread #0 -
smb://rce_cad_rms_es.rc-ecc.org/StPaul/Out]
org.apacheextras.camel.component.jcifs.DefaultSmbClient login()
domain[rc-ecc] username[testuser] password[***]

However, it still cannot connect to that server:

org.apache.camel.component.file.GenericFileOperationFailedException: Could
not get files Failed to connect to server
at
org.apacheextras.camel.component.jcifs.SmbOperations.listFiles(SmbOperations.java:345)
~[camel-jcifs-2.15.0.jar:2.15.0]
at
org.apacheextras.camel.component.jcifs.SmbConsumer.pollDirectory(SmbConsumer.java:58)
~[camel-jcifs-2.15.0.jar:2.15.0]
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:119)
~[camel-core-2.16.3.jar:2.16.3]
at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
[camel-core-2.16.3.jar:2.16.3]
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
[camel-core-2.16.3.jar:2.16.3]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[na:1.8.0_102]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
[na:1.8.0_102]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[na:1.8.0_102]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[na:1.8.0_102]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[na:1.8.0_102]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
Caused by: jcifs.smb.SmbException: Failed to connect to server
at jcifs.smb.SmbFile.connect0(SmbFile.java:882) ~[jcifs-1.3.17.jar:na]
at jcifs.smb.SmbFile.resolveDfs(SmbFile.java:669) ~[jcifs-1.3.17.jar:na]
at jcifs.smb.SmbFile.send(SmbFile.java:773) ~[jcifs-1.3.17.jar:na]
at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1986)
~[jcifs-1.3.17.jar:na]
at jcifs.smb.SmbFile.doEnum(SmbFile.java:1738) ~[jcifs-1.3.17.jar:na]
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1715) ~[jcifs-1.3.17.jar:na]
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1648) ~[jcifs-1.3.17.jar:na]
at
org.apacheextras.camel.component.jcifs.DefaultSmbClient.listFiles(DefaultSmbClient.java:161)
~[camel-jcifs-2.15.0.jar:2.15.0]
at
org.apacheextras.camel.component.jcifs.SmbOperations.listFiles(SmbOperations.java:341)
~[camel-jcifs-2.15.0.jar:2.15.0]
... 11 common frames omitted

What am I missing?  Does camel not fully support smb?




--
View this message in context: 
http://camel.465427.n5.nabble.com/smb-cannot-connect-to-server-tp5789414.html
Sent from the Camel - Users mailing list archive at Nabble.com.


camel 2.18.0 rabbitmq component fails under Karaf

2016-10-28 Thread gustavo.maurizio
trying to install camel-rabbitmq under Karaf 4.0.6 fails unable to resolve
com.rabbitmq.client.
Was working fine in 2.17.3
Any ideas or help?


ka...@sis.gt.common()> feature:install  camel-rabbitmq
Error executing command: Unable to resolve root: missing requirement [root]
osgi.identity; osgi.identity=camel-rabbitmq; type=karaf.feature;
version="[2.18.0,2.18.0]";
filter:="(&(osgi.identity=camel-rabbitmq)(type=karaf.feature)(version>=2.18.0)(version<=2.18.0))"
[caused by: Unable to resolve camel-rabbitmq/2.18.0: missing requirement
[camel-rabbitmq/2.18.0] osgi.identity;
osgi.identity=org.apache.camel.camel-rabbitmq; type=osgi.bundle;
version="[2.18.0,2.18.0]"; resolution:=mandatory [caused by: Unable to
resolve org.apache.camel.camel-rabbitmq/2.18.0: missing requirement
[org.apache.camel.camel-rabbitmq/2.18.0] osgi.wiring.package;
filter:="(&(osgi.wiring.package=com.rabbitmq.client)(version>=3.6.0)(!(version>=4.0.0)))"
[caused by: Unable to resolve com.rabbitmq.client/3.6.5: missing requirement
[com.rabbitmq.client/3.6.5] osgi.wiring.package;
filter:="(osgi.wiring.package=junit.framework)"]]]
ka...@sis.gt.common()> 




--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-2-18-0-rabbitmq-component-fails-under-Karaf-tp5789413.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Setting TTL on Netty4 multicast endpoint

2016-10-28 Thread Tomohisa Igarashi

Hi,

I think it should be "IP_MULTICAST_TTL"
https://github.com/netty/netty/blob/4.1/transport/src/main/java/io/netty/channel/ChannelOption.java#L122

But note that the ChannelOptions are no longer string literal unlike netty3... 
hopefully something like following would work
if (configuration.getOptions() != null) {
for (Map.Entry entry : 
configuration.getOptions().entrySet()) {
clientBootstrap.option(ChannelOption.valueOf(entry.getKey()), 
entry.getValue());
}
}

Thanks,
Tomo

On 10/28/2016 11:39 PM, robina wrote:

Aha, many thanks Tomo.

I'll raise the issue in JIRA.

Following the update, do you know what I'd replace the 'XXX' with in the
'option.XXX' option to update the multicast TTL?

Regards,
Rob




--
View this message in context: 
http://camel.465427.n5.nabble.com/Setting-TTL-on-Netty4-multicast-endpoint-tp5789344p5789404.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Setting TTL on Netty4 multicast endpoint

2016-10-28 Thread robina
Aha, many thanks Tomo.

I'll raise the issue in JIRA. 

Following the update, do you know what I'd replace the 'XXX' with in the
'option.XXX' option to update the multicast TTL?

Regards,
Rob




--
View this message in context: 
http://camel.465427.n5.nabble.com/Setting-TTL-on-Netty4-multicast-endpoint-tp5789344p5789404.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Setting TTL on Netty4 multicast endpoint

2016-10-28 Thread Tomohisa Igarashi

Hi,

I just took a look at this one, it seems camel-netty4 doesn't yet implement 
option.XXX
https://github.com/apache/camel/blob/master/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java#L417-L424

Would you file a JIRA for it?

Thanks,
Tomo

On 10/27/2016 08:57 PM, robina wrote:

Hi all,

I'm using Netty4 to broadcast UDP datagrams using an endpoint configured as
follows:

netty4:udp://239.192.2.25:2100?sync=falsebroadcast=trueallowDefaultCodec=falsenetworkInterface=eth3

The problem I have is that the default TTL is 1, but I'm required to
broadcast to a number of subnets, so need to increase the TTL to a higher
value.  Does anyone know what option I should be setting?

From the camel documentation, it looks like I should be using the
'option.XXX' option, however I'm not sure what the option value should be.
I've tried a few different combinations, e.g. option.IP_MULTICAST_TTL=5,
option.DatagramChannelConfig.IP_MULTICAST_TTL=5, option.timeToLive=5 etc.

Could anyone help out with the correct option?  And/or confirm if the
ability to change the TTL is supported in the netty4 component?

Thanks in advance,
Rob



--
View this message in context: 
http://camel.465427.n5.nabble.com/Setting-TTL-on-Netty4-multicast-endpoint-tp5789344.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Is GenericFileOperationFailedException handled differently than other exceptions?

2016-10-28 Thread Klaus Johansen
Hi again, 

Let me rephrase: My problem is that GenericFileOperationFailedException goes
directly to the dead letter channel and and completely bypass redelivery. 

I don't have any onException statements which reset maximumRedeliveries to
0. 

Is this excepted behavior? 

(In my earlier post I mentioned "FatalFallbackErrorHandler": It was invoked
because onPrepareFailure threw another exception. But it really doesn't make
any difference: the mentioned type of FTP related errors bypass redelivery
and goes directly to the dead letter channel with or without the
onPrepareFailure processor.)

Cheers, 
Klaus



--
View this message in context: 
http://camel.465427.n5.nabble.com/Is-GenericFileOperationFailedException-handled-differently-than-other-exceptions-tp5789339p5789397.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Question on multicast to pipelines

2016-10-28 Thread Edoardo Causarano
Hi all,

I had some trouble figuring out how to multicast to some pipelines. I 
eventually found a [working] definition, but I also expected other forms to 
work such as:

.multicast().aggregationStrategy(AggregationStrategies.groupedExchange())
.pipeline("A", "B")
.pipeline("C", "D")
.end()

or 

.multicast().aggregationStrategy(AggregationStrategies.groupedExchange())
.to("A", "B")
.to("C", "D")
.end()

yet they all fail (in the sense that they all receive the original START 
incoming payload. Can anyone explain how this is expected behavior? 


Best,
Edoardo


[working]: https://gist.github.com/ecausarano/4b66294464741b9f626890b29ea0aec2





Re: JpaConsumer endpoint not showing up in hawtio.

2016-10-28 Thread Claus Ibsen
Hi

Are you creating the endpoint instance yourself eg do you do

JpaEndpoint jpaEventoPieza = new JpaEndpoint();

Its likely related to this fact if you create the endpoint instance yourself.

Also try upgrading Camel to a newer release.

On Thu, Oct 27, 2016 at 2:38 PM, raulsperoni  wrote:
> Hi, i'm using wildly-camel, camel 2.16.3, hawtio (1.4.60) comes really handy,
> but i can't get routes with jpa consumer endpoint to appear in the list, in
> fact i'm using direct channels to join the jpaconsumer route with the rest.
>
> Do you have any idea why this is happening?
>
> Here is an example...
>
> //EventoPieza
> jpaEventoPieza.setCamelContext(getContext());
> jpaEventoPieza.setEntityType(EventoPieza.class);
> jpaEventoPieza.setEntityManagerFactory(entityManagerFactory);
> jpaEventoPieza.setTransactionManager(transactionManager);
> jpaEventoPieza.setEndpointUriIfNotSpecified("jpa://archivoEventoPieza");
> //Consumer
> jpaEventoPieza.setConsumeDelete(false);
> Map prop = new HashMap<>();
> prop.put("delay", delay);
> prop.put("namedQuery", "pieza.paraArchivar");
> jpaEventoPieza.setConsumerProperties(prop);
> jpaEventoPieza.setBackoffMultiplier(backoff_multiplier);
> jpaEventoPieza.setBackoffIdleThreshold(backoff_threshold);
> jpaEventoPieza.setMaximumResults(1000);
>
> from(jpaEventoPieza).to("direct:archivarEventoPieza").autoStartup(isHabilitado());
> from("direct:archivarEventoPieza").routeId("A_" + id_prefix)
> .setHeader("key",
> constant(Configuracion.GENERAL_ARCHIVO_OFFSET))
>
>
> Thanks!
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/JpaConsumer-endpoint-not-showing-up-in-hawtio-tp5789346.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: help with WARN messages in camel 2.18.0

2016-10-28 Thread Claus Ibsen
Essentially you can ignore those WARNs but you can also configure what
Camel should do with the TypeConverterExists option.

See for example this unit test
https://github.com/apache/camel/blob/master/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryTest.java



On Thu, Oct 27, 2016 at 3:03 PM, gustavo.maurizio  wrote:
> We are receiving some error messages when upgrading route to 2.18.
>
> Any ideas?
> [ Blueprint Extender: 2] ManagedManagementStrategy  INFO  JMX is
> enabled
> [ Blueprint Extender: 2] DefaultTypeConverter   WARN
> Overriding type converter from: StaticMethodTypeConverter: public static
> javax.servlet.http.HttpServletRequest
> org.apache.camel.http.common.HttpConverter.toServletRequest(org.apache.camel.Message)
> to: StaticMethodTypeConverter: public static
> javax.servlet.http.HttpServletRequest
> org.apache.camel.http.common.HttpConverter.toServletRequest(org.apache.camel.Message)
> [ Blueprint Extender: 2] DefaultTypeConverter   WARN
> Overriding type converter from: StaticMethodTypeConverter: public static
> java.io.InputStream
> org.apache.camel.http.common.HttpConverter.toInputStream(org.apache.camel.http.common.HttpMessage,org.apache.camel.Exchange)
> throws java.lang.Exception to: StaticMethodTypeConverter: public static
> java.io.InputStream
> org.apache.camel.http.common.HttpConverter.toInputStream(org.apache.camel.http.common.HttpMessage,org.apache.camel.Exchange)
> throws java.lang.Exception
> [ Blueprint Extender: 2] DefaultTypeConverter   WARN
> Overriding type converter from: StaticMethodTypeConverter: public static
> java.io.InputStream
> org.apache.camel.http.common.HttpConverter.toInputStream(javax.servlet.http.HttpServletRequest,org.apache.camel.Exchange)
> throws java.io.IOException to: StaticMethodTypeConverter: public static
> java.io.InputStream
> org.apache.camel.http.common.HttpConverter.toInputStream(javax.servlet.http.HttpServletRequest,org.apache.camel.Exchange)
> throws java.io.IOException
> [ Blueprint Extender: 2] DefaultTypeConverter   WARN
> Overriding type converter from: StaticMethodTypeConverter: public static
> java.io.BufferedReader
> org.apache.camel.http.common.HttpConverter.toReader(org.apache.camel.http.common.HttpMessage)
> throws java.io.IOException to: StaticMethodTypeConverter: public static
> java.io.BufferedReader
> org.apache.camel.http.common.HttpConverter.toReader(org.apache.camel.http.common.HttpMessage)
> throws java.io.IOException
> [ Blueprint Extender: 2] DefaultTypeConverter   WARN
> Overriding type converter from: StaticMethodTypeConverter: public static
> javax.servlet.ServletInputStream
> org.apache.camel.http.common.HttpConverter.toServletInputStream(org.apache.camel.http.common.HttpMessage)
> throws java.io.IOException to: StaticMethodTypeConverter: public static
> javax.servlet.ServletInputStream
> org.apache.camel.http.common.HttpConverter.toServletInputStream(org.apache.camel.http.common.HttpMessage)
> throws java.io.IOException
> [ Blueprint Extender: 2] DefaultTypeConverter   WARN
> Overriding type converter from: StaticMethodTypeConverter: public static
> javax.servlet.http.HttpServletResponse
> org.apache.camel.http.common.HttpConverter.toServletResponse(org.apache.camel.Message)
> to: StaticMethodTypeConverter: public static
> javax.servlet.http.HttpServletResponse
> org.apache.camel.http.common.HttpConverter.toServletResponse(org.apache.camel.Message)
> [ Blueprint Extender: 2] DefaultTypeConverter   WARN
> Overriding type converter from: StaticMethodTypeConverter: public static
> org.apache.activemq.command.ActiveMQDestination
> org.apache.activemq.camel.converter.ActiveMQConverter.toDestination(java.lang.String)
> to: StaticMethodTypeConverter: public static
> org.apache.activemq.command.ActiveMQDestination
> org.apache.activemq.camel.converter.ActiveMQConverter.toDestination(java.lang.String)
> [ Blueprint Extender: 2] DefaultTypeConverter   WARN
> Overriding type converter from: InstanceMethodTypeConverter: public
> org.apache.camel.Processor
> org.apache.activemq.camel.converter.ActiveMQMessageConverter.toProcessor(javax.jms.MessageListener)
> to: InstanceMethodTypeConverter: public org.apache.camel.Processor
> org.apache.activemq.camel.converter.ActiveMQMessageConverter.toProcessor(javax.jms.MessageListener)
> [ Blueprint Extender: 2] DefaultTypeConverter   WARN
> Overriding type converter from: InstanceMethodTypeConverter: public
> org.apache.activemq.command.ActiveMQMessage
> org.apache.activemq.camel.converter.ActiveMQMessageConverter.toMessage(org.apache.camel.Exchange)
> throws javax.jms.JMSException to: InstanceMethodTypeConverter: public
> org.apache.activemq.command.ActiveMQMessage
> org.apache.activemq.camel.converter.ActiveMQMessageConverter.toMessage(org.apache.camel.Exchange)
> throws javax.jms.JMSException
> [ 

Re: camel 2.18.0 file component filter example

2016-10-28 Thread Claus Ibsen
Hi

You can try look in the unit tests of camel-core as there is likely
some unit tests covering this functionality.

On Thu, Oct 27, 2016 at 1:08 PM, gustavo.maurizio  wrote:
> Can someone please provide an example of the new file2 filterFile and
> filterDirectory usage with simple expression?
> We want to process recursively a directory and its subdirectories but only
> matching files or directories (and all its subfiles) that have name MMDD
> lower or equal the run moment.
>
> Any example will do...
> thanks!
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-2-18-0-file-component-filter-example-tp5789342.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Camel-ahc-ws netty runtime problems

2016-10-28 Thread Claus Ibsen
When using Spring Boot and Camel 2.18 onwards you should use the
-starter components, eg camel-ahc-ws-starter and so on.



On Tue, Oct 25, 2016 at 8:21 PM, Ingram, Stuart  wrote:
> Using the following dependencies
>
> compile('org.apache.camel:camel-jackson:2.18.0')
> compile('org.apache.camel:camel-metrics:2.18.0')
> compile('org.apache.camel:camel-spring-boot-starter:2.18.0')
> compile('org.apache.camel:camel-spring-redis:2.18.0')
> compile('org.apache.camel:camel-stream:2.18.0')
> compile('org.apache.camel:camel-ahc-ws:2.18.0')
> compile('org.springframework.boot:spring-boot-actuator')
> compile("org.springframework.boot:spring-boot-starter-web")
>
> And the following ahc-ws definition in Spring Boot
>
> .
> .multicast()
> .parallelProcessing()
>
> .pipeline()
> .marshal().json(JsonLibrary.Jackson)
> .convertBodyTo(String.class)  // Avoids string serialization issues 
> in websocket component.
> .to("ahc-ws://localhost:8080/votes?sendToAll=true")
> .end()
> .
>
> At runtime I get the following error when publishing to this sink
>
> 2016-10-25 11:41:45.689  INFO 1864 --- [ #7 - Multicast] 
> o.a.camel.component.ahc.ws.WsEndpoint: Reconnecting websocket: 
> ws://localhost:8080/votes?sendToAll=true
> 2016-10-25 11:41:45.777 ERROR 1864 --- [ #7 - Multicast] 
> o.a.camel.processor.DefaultErrorHandler  : Failed delivery for (MessageId: 
> ID-singram-mint172-42019-1477410101007-0-56 on ExchangeId: 
> ID-singram-mint172-42019-1477410101007-0-59). Exhausted after delivery 
> attempt: 1 caught: java.util.concurrent.ExecutionException: 
> java.net.ConnectException: 
> io.netty.channel.DefaultChannelId.newInstance()Lio/netty/channel/DefaultChannelId;
>
> java.util.concurrent.ExecutionException: java.net.ConnectException: 
> io.netty.channel.DefaultChannelId.newInstance()Lio/netty/channel/DefaultChannelId;
> at 
> org.asynchttpclient.netty.NettyResponseFuture.abort(NettyResponseFuture.java:239)
>  ~[async-http-client-2.0.15.jar:na]
> at 
> org.asynchttpclient.netty.channel.NettyConnectListener.onFailure(NettyConnectListener.java:162)
>  ~[async-http-client-2.0.15.jar:na]
> at 
> org.asynchttpclient.netty.request.NettyChannelConnector$1.onFailure(NettyChannelConnector.java:103)
>  ~[async-http-client-2.0.15.jar:na]
> at 
> org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:28)
>  ~[async-http-client-2.0.15.jar:na]
> at 
> org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:20)
>  ~[async-http-client-2.0.15.jar:na]
> at 
> io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:514)
>  ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at 
> io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:488)
>  ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at 
> io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:34) 
> ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at 
> io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:438) 
> ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at 
> io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:233)
>  ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at 
> io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
>  ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
> Caused by: java.net.ConnectException: 
> io.netty.channel.DefaultChannelId.newInstance()Lio/netty/channel/DefaultChannelId;
> at 
> org.asynchttpclient.netty.channel.NettyConnectListener.onFailure(NettyConnectListener.java:160)
>  ~[async-http-client-2.0.15.jar:na]
> ... 10 common frames omitted
> Caused by: java.lang.NoSuchMethodError: 
> io.netty.channel.DefaultChannelId.newInstance()Lio/netty/channel/DefaultChannelId;
> at io.netty.channel.AbstractChannel.newId(AbstractChannel.java:107) 
> ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at io.netty.channel.AbstractChannel.(AbstractChannel.java:79) 
> ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at 
> io.netty.channel.nio.AbstractNioChannel.(AbstractNioChannel.java:84) 
> ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at 
> io.netty.channel.nio.AbstractNioByteChannel.(AbstractNioByteChannel.java:54)
>  ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at 
> io.netty.channel.socket.nio.NioSocketChannel.(NioSocketChannel.java:98) 
> ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at 
> io.netty.channel.socket.nio.NioSocketChannel.(NioSocketChannel.java:88) 
> ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
> at 
> 

Re: Losing mi sanity on pipeline testing

2016-10-28 Thread Edoardo Causarano
Hi Quinn,

Thanks that's correct, but really I was looking for a way to test the
construct timer+broadcast+pipelines+merged_processor.

Shoving the datasets to fake the remotes inside the pipelines made sense.

Anyway, I'll see if I have time to get back to this setup sometime later.
Right now I'm working along with a different kludge :/


Edoardo


Re: apache camel returns statusCode:500

2016-10-28 Thread meng
Hi Avnish,

Thanks for your replying. I finally found the problem is the json format I
passed to the server is incorrect...Then it works now.
Thanks,

Meng



--
View this message in context: 
http://camel.465427.n5.nabble.com/apache-camel-returns-statusCode-500-tp578p5789367.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Problem: Concatenate the different input(from different route) using aggreagationStrategy

2016-10-28 Thread meng
I change to  .aggregate(simple("${body}"), new
JoinReplyAggregationStrategy()), now no exceptions, but only returns the
second exchange from route 2. No original payload comes in to aggregate



--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-Concatenate-the-different-input-from-different-route-using-aggreagationStrategy-tp5789368p5789370.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Problem: Concatenate the different input(from different route) using aggreagationStrategy

2016-10-28 Thread meng
Hi, I now design three route to process my input message and want to
concatenate them using my aggregation strategy.Here is my design:
payload ->route1:"direct:start", do multicast to route 2("direct:a") and
route 3("direct:b")
in route 2("direct:a"), do multicast to 8 servers, and use
JoinReplyAggregationStrategy to concatenate the result, lets call the result
as route2result and sent this result to route 3("direct:b")
in route 3("direct:b"), now have two inputs, the original payload from route
1 and the result from route2.
I also want to use the same JoinReplyAggregationStrategy to concatenate
these two parts, but it give me an exception and the output is only the
original payload from route1("direct:start").
Here is the exception:
Caused by: java.lang.NullPointerException: null
at
mengt.camel.JoinReplyAggregationStrategy.aggregate(JoinReplyAggregationStrategy.java:19)
~[main/:na]
at
org.apache.camel.processor.aggregate.AggregateProcessor.onAggregation(AggregateProcessor.java:629)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.processor.aggregate.AggregateProcessor.doAggregation(AggregateProcessor.java:447)
~[camel-core-2.16.1.jar:2.16.1]
... 29 common frames omitted

Here is the code of how to implement my route and aggregation Strategy:
public void configure() throws Exception{
from("direct:start")
.marshal()
.string(UTF_8)
.multicast()
.parallelProcessing()
.to("direct:route1")
.to("direct:route2")
;

from("direct:route1")
.multicast()
.parallelProcessing()
.aggregationStrategy(new JoinReplyAggregationStrategy())
.to(TARGET1, TARGET2, TARGET3, TARGET4, TARGET5, TARGET6,
TARGET7, TARGET8)
//.to("log:?level=INFO=true")
.timeout(10)
.end()
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception
{
String input =
exchange.getIn().getBody(String.class).replaceAll("}\\+\\{", ",");
exchange.getOut().setBody(input);
System.out.println(input);
}
})
.to("stream:out")
   // .to("direct:b")
.to("direct:route2");

   from("direct:route2")
  .aggregate(constant(true), new JoinReplyAggregationStrategy())
   .completionTimeout(500L)
  .to("stream:out")

public class JoinReplyAggregationStrategy implements AggregationStrategy{

public Exchange aggregate(Exchange exchangeOld, Exchange exchangeNew){
//String body1 = null;
//static Logger logger = Logger.getLogger(exchangeOld.getIn());
if(exchangeOld == null){
return exchangeNew;
}else {
String body1 = exchangeOld.getIn().getBody(String.class);
String body2 = exchangeNew.getIn().getBody(String.class);
String status = "Http Status " +
exchangeOld.getIn().getHeader("CamelHttpResponseCode").toString();
System.out.println(status);
String merged = (body1 == null) ? body2 : body1 + "+" +body2;
exchangeOld.getIn().setBody(merged);
//System.out.println(merged);
return exchangeOld;
}
}
}

Can I use the aggregation Strategy to concatenate the input from other two
routes directly like this? Or my understanding of aggregation is wrong?
Thanks,

Meng



--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-Concatenate-the-different-input-from-different-route-using-aggreagationStrategy-tp5789368.html
Sent from the Camel - Users mailing list archive at Nabble.com.