Re: Camel with OSGI in Felix with Spring DSL

2017-03-06 Thread kumar

Now I started Looking into blueprint-Aries + camel , migrating all codes and
xml namespaces from spring.
Lets see how ot would be..

Thanks for all your support.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-with-OSGI-in-Felix-with-Spring-DSL-tp5794738p5794984.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel with OSGI in Felix with Spring DSL

2017-03-06 Thread Tim Jones
As Claus has pointed out you are probably better not to use Gemini Blueprint,
it is not a very active project and I doubt whether you will find much
support within the Karaf/Felix/OSGi community.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-with-OSGI-in-Felix-with-Spring-DSL-tp5794738p5794981.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Http4 using basic auth and proxy auth

2017-03-06 Thread Claus Ibsen
Yeah sounds like a little bug. You are welcome to log a JIRA and
provide a PR with a fix. You have a system where you can test it.
http://camel.apache.org/contributing

On Mon, Mar 6, 2017 at 5:41 PM, Xavier López  wrote:
> I've been trying to use Apache Camel's Http4 component to connect to a
> HTTPS URL that needs Basic authentication. The connection needs to be
> done through an authenticated HTTP proxy.
>
> So, according to the docs at http://camel.apache.org/http4.html, I
> configure the Camel endpoint like this:
>
> .toD("https4://target.host/resource?
> bridgeEndpoint=true
> &mapHttpMessageBody=false
>
> &proxyAuthHost=my.proxy.host
> &proxyAuthPort=myProxyPort
> &proxyAuthUsername=proxyUser
> &proxyAuthPassword=proxyPassword
> &proxyAuthScheme=http4
>
> &authenticationPreemptive=true
> &authUsername=myUser
> &authPassword=myPassword")
>
> Which results in a "403 - Forbidden" response from the target server.
> Looking through the "org.apache.http.wire" logs, it shows that the
> proxy credentials proxyUser/proxyPassword are forwarded to the target
> server instead of the intended myUser/myPassword in the
> "Authorization" header instead .
>
> Debugging the source for CompositeHTTPConfigurer.configureHttpClient,
> ProxyHttpClientConfigurer.configureHttpClient and
> BasicAuthenticationHttpClientConfigurer.configureHttpClient, it seems
> that both configurers are setting their credentials to the
> HttpClientBuilder by means of setDefaultCredentialsProvider. Mostly
> because they do little more than set that defaultCredentialsProvider
> on the HttpClientBuilder, that gets overwritten.
>
> It seems it's working fine if the proxy auth header is provided
> independently from the Http4 component by means of
> setHeader("Proxy-Authorization", simple("Basic ")).
>
> Looks like it could be a bug in Camel's Http4 component? Or am I
> missing something? This is Camel 2.18.2 with Spring Boot 1.5.1.RELEASE
>
> I've also posted this question over at SO
> (http://stackoverflow.com/questions/42629981/) but figured it'd get
> better attention here. Sorry for the repost.
>
> Best regards,
> Xavi



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


Camel Http4 using basic auth and proxy auth

2017-03-06 Thread Xavier López
I've been trying to use Apache Camel's Http4 component to connect to a
HTTPS URL that needs Basic authentication. The connection needs to be
done through an authenticated HTTP proxy.

So, according to the docs at http://camel.apache.org/http4.html, I
configure the Camel endpoint like this:

.toD("https4://target.host/resource?
bridgeEndpoint=true
&mapHttpMessageBody=false

&proxyAuthHost=my.proxy.host
&proxyAuthPort=myProxyPort
&proxyAuthUsername=proxyUser
&proxyAuthPassword=proxyPassword
&proxyAuthScheme=http4

&authenticationPreemptive=true
&authUsername=myUser
&authPassword=myPassword")

Which results in a "403 - Forbidden" response from the target server.
Looking through the "org.apache.http.wire" logs, it shows that the
proxy credentials proxyUser/proxyPassword are forwarded to the target
server instead of the intended myUser/myPassword in the
"Authorization" header instead .

Debugging the source for CompositeHTTPConfigurer.configureHttpClient,
ProxyHttpClientConfigurer.configureHttpClient and
BasicAuthenticationHttpClientConfigurer.configureHttpClient, it seems
that both configurers are setting their credentials to the
HttpClientBuilder by means of setDefaultCredentialsProvider. Mostly
because they do little more than set that defaultCredentialsProvider
on the HttpClientBuilder, that gets overwritten.

It seems it's working fine if the proxy auth header is provided
independently from the Http4 component by means of
setHeader("Proxy-Authorization", simple("Basic ")).

Looks like it could be a bug in Camel's Http4 component? Or am I
missing something? This is Camel 2.18.2 with Spring Boot 1.5.1.RELEASE

I've also posted this question over at SO
(http://stackoverflow.com/questions/42629981/) but figured it'd get
better attention here. Sorry for the repost.

Best regards,
Xavi


Re: Camel performance issue

2017-03-06 Thread RichardChen
Thanks for replying. Here is the process:
We copy 1000 xml files from source folder to destination folder in every
test, for example from "c:/source" to "c:/dest“. Our camel route will
consume those xml files, and convert them to JTO objects, at last send to
JMS queue(ActiveMQ).

Test 1 on physical machine, it takes more than 2 minutes.
Test 2 on the VM which is hosted on the physical machine above, it takes
about 30 seconds.

We have tested this on several machines, always VM is faster. 
We are testing the performance of our product which is integrated with
Camel, so we did a lot of test on different platforms. We are confused about
performance gap between physical machine and VM. From the hawtio profiling
we found that IO maybe the bottle neck, VM consumes files is faster that
phycial machine.

Our machines are powerful enough, so hardware should not be the problem I
think. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-performance-issue-tp5794918p5794957.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel performance issue

2017-03-06 Thread souciance
Well I have used the file component both in a VM, docker and a physical
host and did not see any drop in performance. There must be something else
on your physical host that is cause this.

Have you done any profiling or enabled AuditEventNotifier on Camel to see
which steps are taking the most time? Where is your ActiveMQ located?

On Mon, Mar 6, 2017 at 2:56 PM, shuston [via Camel] <
ml-node+s465427n5794958...@n5.nabble.com> wrote:

> Did you run it multiple times in succession for each scenario? The file
> system cache may skew your timing if you just run it once.
>
> > -Original Message-
> > From: RichardChen [mailto:[hidden email]
> ]
> > Sent: Monday, March 06, 2017 5:13 AM
> > To: [hidden email]
> 
> > Subject: Camel performance issue
> >
> > We are facing performance problem when we integrate camel into our
> > product.
> > The simple scenario is this: let camel monitor a folder, put 1000 xml
> files to
> > that folder, camel consume all the files and send them to ActiveMQ.
> >
> > I ran this scenario in both physical machine and VM(hosted on the same
> > physical machine). The result is really confused me, the VM's
> performance is
> > higher than physical machine.
> > I found that, camel on VM consumed files very fast, but meanwhie
> physical
> > machine was slow.
> >
> > Anthoer thing is our product pervious using Mule ESB, the performance is
> > higher than camel when running the same scenario.
> >
> > Our testing evniroment is clean, no anti-virus software installed. Do OS
> > version impact the result?
> > We are using Windows7 x64 and Windows Server 2012 x64, camel is running
> > on Apache Tomcat 8.5.6.
> >
> > Have you met the same problem when using camel? Or is there some
> > advices on improving performance of my scenario?
> >
> > Thanks
> >
> >
> >
> > --
> > View this message in context: http://camel.465427.n5.nabble.com/Camel-
> > performance-issue-tp5794918.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Camel-performance-issue-
> tp5794918p5794958.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-performance-issue-tp5794918p5794960.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: Camel performance issue

2017-03-06 Thread Steve Huston
Did you run it multiple times in succession for each scenario? The file system 
cache may skew your timing if you just run it once.

> -Original Message-
> From: RichardChen [mailto:richard.c...@spsoft-cn.com]
> Sent: Monday, March 06, 2017 5:13 AM
> To: users@camel.apache.org
> Subject: Camel performance issue
> 
> We are facing performance problem when we integrate camel into our
> product.
> The simple scenario is this: let camel monitor a folder, put 1000 xml files to
> that folder, camel consume all the files and send them to ActiveMQ.
> 
> I ran this scenario in both physical machine and VM(hosted on the same
> physical machine). The result is really confused me, the VM's performance is
> higher than physical machine.
> I found that, camel on VM consumed files very fast, but meanwhie physical
> machine was slow.
> 
> Anthoer thing is our product pervious using Mule ESB, the performance is
> higher than camel when running the same scenario.
> 
> Our testing evniroment is clean, no anti-virus software installed. Do OS
> version impact the result?
> We are using Windows7 x64 and Windows Server 2012 x64, camel is running
> on Apache Tomcat 8.5.6.
> 
> Have you met the same problem when using camel? Or is there some
> advices on improving performance of my scenario?
> 
> Thanks
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-
> performance-issue-tp5794918.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel SFTP

2017-03-06 Thread finx
Yeah... I thought the same, until I got a password with special chars and I
spent like two days investigating why the connection fails!

Not sure if RAW() can be used for other parameters... I think that is
possible, but I never tried. Only can be sure testing it.

Good luck!

Abraços,
Luis Felipe - Finx

On Mon, Mar 6, 2017 at 12:40 AM, David Hoffer  wrote:

> Thanks for the tip I did not know about this.  I would think Camel would
> want to treat all passwords as raw...can never tolerate those changing.
> Once we get back on site (Monday I think) we will give this a try...I hope
> this fixes the connection with Camel.
>
> Btw, what if the username or folder had a special character?  Can RAW() be
> used for any parameter?
>
> -Dave
>
> On Sat, Mar 4, 2017 at 9:19 AM, finx  wrote:
>
> > Hi Dave.
> >
> > Does the password have special characters? I faced a similar situation,
> and
> > the solution was to use the RAW function (
> > http://camel.apache.org/how-do-i-configure-password-
> > options-on-camel-endpoints-without-the-value-being-encoded.html)
> > in the password.
> >
> > Abraços,
> > Luis Felipe - Finx
> >
> > On Fri, Mar 3, 2017 at 11:52 PM, David Hoffer 
> wrote:
> >
> > > We are using password authentication
> > >
> > > We have log4j configured but aren't seeing any connection handshake log
> > > messages with debug enabled but I'm not sure what JSCH (the actual
> > > connection library) has for logging.
> > >
> > > Our situation is we have an SFTP server that we have no control over
> that
> > > is refusing to connect with Camel.  However we can connect with fsftp
> > > fine.  SSH is disabled so cannot connect with putty.  However when we
> > setup
> > > a similar linux server locally camel connects to it just fine.  We are
> > > trying to figure out why it fails for this one connection we have no
> > > control or system information of (e.g. we can't get on the box that is
> > > failing to accept our connection and check logs/etc).
> > >
> > > -Dave
> > >
> > > On Fri, Mar 3, 2017 at 5:41 PM, S AR  wrote:
> > >
> > > > What errors do you receive?
> > > >
> > > > Are you using password authentication or privateKey authentication?
> > > >
> > > > If you are using privateKey, Have you generated a private key file?
> > > >
> > > > Regarding logging, since camel uses log4j2, you can configure an
> > appender
> > > > for the classes in the package: org.apache.camel.component.file
> > > >
> > > > In log4j2, that means, you should have something like this:
> > > >
> > > > appender.mylogger.type = Console
> > > > appender.mylogger.name = MYLOGGER
> > > > appender.mylogger.layout.type = PatternLayout
> > > > appender.mylogger.layout.pattern = %d %p %C{1.} [%t] %m%n
> > > >
> > > > logger.mylogger.name = org.apache.camel.component.file
> > > > logger.mylogger.level = debug
> > > > logger.mylogger.additivity = false
> > > > logger.mylogger.appenderRef.mylogger.ref = MYLOGGER
> > > >
> > > > Regards.
> > > >
> > > > On 03.03.2017 18:16, David Hoffer wrote:
> > > >
> > > > Is there a way to turn on low level logging so we can see why Camel
> is
> > > > failing to connect?  We can connect to the same server with puttyftp
> > and
> > > > put files but not with camel...and the errors are not very detailed.
> > > >
> > > > -Dave
> > > >
> > > > On Fri, Mar 3, 2017 at 9:54 AM, S AR <
> mailto:
> > > > sa_remin...@hotmail.com> wrote:
> > > >
> > > >
> > > >
> > > > Hello David,
> > > >
> > > > When I work with camel-sftp, The first thing I do is to manually
> > connect
> > > > to the remote machine via ssh, so that my knownHosts
> > > > (System.getProperty(user.home)/.ssh/known_hosts) file is written. On
> > > > windows, I use cygwin for that. I assume you can do the same with
> > putty.
> > > >
> > > >
> > > > You specify the certificate file as an option, as described in the
> > > > documentation: http://camel.apache.org/ftp2.html
> > > >
> > > > knownHostFile: path to your known_hosts
> > > >
> > > > privateKeyFile: path to your id_rsa
> > > >
> > > >
> > > > privateKeyFilePassphrase: passphrase of you id_rsa
> > > >
> > > >
> > > > Hope it gives you an idea about where to look at.
> > > >
> > > >
> > > > Good luck.
> > > >
> > > >
> > > > On 03.03.2017 17:32, David Hoffer wrote:
> > > >
> > > > How does Camel handle the SSH cert when connecting to SFTP servers?
> > > > Somehow it has to accept the cert provided by the server how does it
> do
> > > > that?
> > > >
> > > > The docs say the default is:
> > > > strictHostKeyChecking=no
> > > >
> > > > What does this mean?  Does this mean it will accept every cert?
> > > >
> > > > What does strictHostKeyChecking=yes mean?
> > > >
> > > > Where does Camel store the cert that it accepted?  Can we preempt
> this
> > > hole
> > > > process by manually accepting the cert with a different tool, eg.
> > > > puttyftp?  In this case there would have to be a shared location for
> > the
> > > > cert...we are running camel on Windows so I think puttyftp stores the
> > > cert
> 

Re: Camel websocket resource URI issue

2017-03-06 Thread Claus Ibsen
Hi

You are welcome to log a JIRA and we love contributions so a github PR
to fix this is appreciated
http://camel.apache.org/support.html
http://camel.apache.org/contributing.html

On Mon, Mar 6, 2017 at 11:07 AM, Ravindra Godbole  wrote:
> Hi
>
> I have a routebuider with the following configuration.
> Only resource URI is different while port is same.
> Ideally other clients connecting to newsTopic should get messages published
> on this topic only but I found out that they are also getting messages
> published on stockQuoteTopic.
>
> On further investigation I found out that memory store used to by sendAll
> is shared by all resource uri for a given port in the server.
>
> Looks like this is a bug which needs to be fixed.
>
>from("activemq:topic:newsTopic").to("websocket://
> 0.0.0.0:9090/newsTopic?sendToAll=true");
>from("activemq:topic:stockQuoteTopic").to("websocket://
> 0.0.0.0:9090/stockQuoteTopic?sendToAll=true");
>
>
> Ouput received from client.
>
> 2017-03-06 15:35:15.789:INFO::main: Logging initialized @313ms
> Connected to server
> Message received from server:
> Message received from server:MSFT
> Message received from server:CNBC News
> Message received from server:BBC News
>
>
>
> --
> - Ravi
>
> *[ View My Youtube Channel ] *
>
> Phone: +91 *98 509 760 91*



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


Re: Camel performance issue

2017-03-06 Thread souciance
You will need to be more specific about the performance.  What was slow?
How long did things take and what was your expectation?  How are you
putting the files?  All at once?  Please provide more metrics.

Den 6 mars 2017 11:13 fm skrev "RichardChen [via Camel]" <
ml-node+s465427n5794918...@n5.nabble.com>:

We are facing performance problem when we integrate camel into our product.
The simple scenario is this: let camel monitor a folder, put 1000 xml files
to that folder, camel consume all the files and send them to ActiveMQ.

I ran this scenario in both physical machine and VM(hosted on the same
physical machine). The result is really confused me, the VM's performance
is higher than physical machine.
I found that, camel on VM consumed files very fast, but meanwhie physical
machine was slow.

Anthoer thing is our product pervious using Mule ESB, the performance is
higher than camel when running the same scenario.

Our testing evniroment is clean, no anti-virus software installed. Do OS
version impact the result?
We are using Windows7 x64 and Windows Server 2012 x64, camel is running on
Apache Tomcat 8.5.6.

Have you met the same problem when using camel? Or is there some advices on
improving performance of my scenario?

Thanks

--
If you reply to this email, your message will be added to the discussion
below:
http://camel.465427.n5.nabble.com/Camel-performance-issue-tp5794918.html
To start a new topic under Camel - Users, email
ml-node+s465427n465428...@n5.nabble.com
To unsubscribe from Camel - Users, click here

.
NAML





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-performance-issue-tp5794918p5794921.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Slack Consumer Component?

2017-03-06 Thread Claus Ibsen
Hi

No this is not supported in camel-slack - its only a producer.

You are welcome to log a JIRA and we love contributions
http://wildfly-swarm.io/posts/to-war-or-jar/


On Thu, Mar 2, 2017 at 2:49 PM, jasenj1  wrote:
> I see that the Slack component allows you to send messages to Slack, but is
> there a way to get messages FROM a Slack channel? Is there a consumer half
> to the producer half?
>
> e.g. 
>
> - Jasen.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Slack-Consumer-Component-tp5794688.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


Camel performance issue

2017-03-06 Thread RichardChen
We are facing performance problem when we integrate camel into our product.
The simple scenario is this: let camel monitor a folder, put 1000 xml files
to that folder, camel consume all the files and send them to ActiveMQ. 

I ran this scenario in both physical machine and VM(hosted on the same
physical machine). The result is really confused me, the VM's performance is
higher than physical machine. 
I found that, camel on VM consumed files very fast, but meanwhie physical
machine was slow. 

Anthoer thing is our product pervious using Mule ESB, the performance is
higher than camel when running the same scenario. 

Our testing evniroment is clean, no anti-virus software installed. Do OS
version impact the result? 
We are using Windows7 x64 and Windows Server 2012 x64, camel is running on
Apache Tomcat 8.5.6.

Have you met the same problem when using camel? Or is there some advices on
improving performance of my scenario? 

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-performance-issue-tp5794918.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel websocket resource URI issue

2017-03-06 Thread Ravindra Godbole
Hi

I have a routebuider with the following configuration.
Only resource URI is different while port is same.
Ideally other clients connecting to newsTopic should get messages published
on this topic only but I found out that they are also getting messages
published on stockQuoteTopic.

On further investigation I found out that memory store used to by sendAll
is shared by all resource uri for a given port in the server.

Looks like this is a bug which needs to be fixed.

   from("activemq:topic:newsTopic").to("websocket://
0.0.0.0:9090/newsTopic?sendToAll=true");
   from("activemq:topic:stockQuoteTopic").to("websocket://
0.0.0.0:9090/stockQuoteTopic?sendToAll=true");


Ouput received from client.

2017-03-06 15:35:15.789:INFO::main: Logging initialized @313ms
Connected to server
Message received from server:
Message received from server:MSFT
Message received from server:CNBC News
Message received from server:BBC News



-- 
- Ravi

*[ View My Youtube Channel ] *

Phone: +91 *98 509 760 91*


Re: Camel with OSGI in Felix with Spring DSL

2017-03-06 Thread Claus Ibsen
No

Use Blueprint from Apache Aries which is what ServiceMix / Karaf /
Camel, JBoss Fuse et all are using and tested with.




On Mon, Mar 6, 2017 at 4:06 AM, kumar  wrote:
> Hi Tim,
>
> Thanks for your suggestion.
> After going through some forums , I found that Gemini Blueprint which
> supports Spring + Camel in OSGi world.
> Whats your opinion on GEMINI BLUEPRINT ?
>
> is it worth to try with gemini ?
>
>
> Thanks,
> Kumar
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-with-OSGI-in-Felix-with-Spring-DSL-tp5794738p5794888.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