Re: Slow FTP

2015-03-19 Thread yogu13
perhaps advising to set buffersize in the camel documentation for ftp can
help get around it for time being.

Regards,
-Yogesh



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


Re: Slow FTP

2015-03-19 Thread yogu13
Hello Claus,

Not sure if camel needs to take that up as I think its already tracked by
the Apache Commons Net team  NET-550
https://issues.apache.org/jira/browse/NET-550   and this change would be
available as part of their 3.4 release. Upgrading to 3.4 once release should
do the trick for camel.

Regards,
-Yogesh



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


Re: Slow FTP

2015-03-19 Thread Claus Ibsen
Their last release is almost 2 years old.
Users of Camel cannot wait another 2 years or so before they decide to
do a release.

On Thu, Mar 19, 2015 at 7:55 AM, yogu13 yog...@gmail.com wrote:
 Hello Claus,

 Not sure if camel needs to take that up as I think its already tracked by
 the Apache Commons Net team  NET-550
 https://issues.apache.org/jira/browse/NET-550   and this change would be
 available as part of their 3.4 release. Upgrading to 3.4 once release should
 do the trick for camel.

 Regards,
 -Yogesh



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



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: MethodInfo evaluate expression

2015-03-19 Thread richardgroote
Thanx, it should be fixed by https://issues.apache.org/jira/browse/CAMEL-8437



--
View this message in context: 
http://camel.465427.n5.nabble.com/MethodInfo-evaluate-expression-tp5764359p5764399.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Slow FTP

2015-03-19 Thread Claus Ibsen
Hi

I logged a ticket about this
https://issues.apache.org/jira/browse/CAMEL-8513

On Tue, Mar 17, 2015 at 11:08 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 Ah I dont think we set the endpoint buffersize on the ftp client by
 default. And that is also by default for writing. Currently the
 FTPClient is configured with the timeout options, but not the buffer
 size.

 That may be a good idea as it really seem that its internal buffer
 size is too low out of the box.



 On Tue, Mar 17, 2015 at 10:40 AM, ulsa ulrik.sandb...@jayway.com wrote:
 Are you saying that the file bufferSize option is the same as
 ftpClient.bufferSize?



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



 --
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Camel Property - UTF 8 issues

2015-03-19 Thread Claus Ibsen
Hi

Yeah that is a good idea Christian. I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-8511

On Tue, Mar 17, 2015 at 10:22 PM, Christian Müller
christian.muel...@gmail.com wrote:
 We don't have a class DefaultPropertyPlaceholder in Camel...

 If you have fixed the issue, it would be good if you can raise a JIRA and
 apply your patch.
 I propose to add an encoding option to the PropertiesComponent. Than we
 can populate the Properties class in DefaultPropertiesResolver with a
 Reader instead an InputStream.

 Best,

 Christian
 -

 Software Integration Specialist

 Apache Member
 V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
 Apache Incubator PMC Member

 https://www.linkedin.com/pub/christian-mueller/11/551/642

 On Tue, Mar 17, 2015 at 6:58 PM, contactreji contactr...@gmail.com wrote:

 Can we have a fix for this if its not available.

 Will be cool if next release can include InputStreamReader constructor
 modified to allow specify UTF-8 unicode characterset reading.

 Something like

 FileInputStream fis = new FileInputStream(
 PathToPropertyFile);
 InputStreamReader isr = new InputStreamReader(fis, UTF8);

 In our project, the fix was done by extending DefaultPropertyPlaceholder
 class and overriding the method to instantiate InputStreamReader with
 charset UTF-8 enforced.



 -
 Reji Mathews
 Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel
  Jboss Fuse ESB | Mule ESB )
 LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
 Twitter - reji_mathews
 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Camel-Property-UTF-8-issues-tp5764281p5764291.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: prevent header duplication for csv file

2015-03-19 Thread yogu13
Hi,

I think the behaviour is happening due to SEDA component which you have
configured as it decouples the message processing into separate threads and
hence every thread ends up writing the header.

try removing seda if the behavior is not needed.

Regards,
-Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/prevent-header-duplication-for-csv-file-tp5764353p5764390.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Does the Simple language have an easy way to get the current exchange object?

2015-03-19 Thread Claus Ibsen
Hi

I logged a ticket to add exchange function to the simple language
https://issues.apache.org/jira/browse/CAMEL-8512

On Wed, Mar 18, 2015 at 9:00 PM, Claus Ibsen claus.ib...@gmail.com wrote:
 There is a route id function

 ${routeId}

 See the functions in the table at
 http://camel.apache.org/simple

 On Wed, Mar 18, 2015 at 8:48 PM, Camel Guy ca...@devguy.com wrote:
 Deep in the message stack I want to do this:

 log message=Finished: ${exchange.getFromRouteId}

 .. instead of putting the from routeId into a property or header, which
 is what I was doing because I was ignorant of exchange.getFromRouteId.

 On Wed, Mar 18, 2015 at 12:30 PM, Claus Ibsen claus.ib...@gmail.com wrote:

 Hi

 No what is the use-case?

 On Wed, Mar 18, 2015 at 8:18 PM, Camel Guy ca...@devguy.com wrote:
  ${exchange} doesn't seem to work
 
 
  Thanks,
  ~dg



 --
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/




 --
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Http Component Post Parameters

2015-03-19 Thread Alden, John
Hi all, I'm having some trouble making a REST service call with POST 
parameters.  I saw a similar post but I didn't understand the solution and I 
need some more direction.

http://camel.465427.n5.nabble.com/Http-Component-Sending-Post-Parameters-td5740321.html#a5740409

The following is my route configuration.

from(timer://runOnce?repeatCount=1)
.onException(Exception.class)
.handled(true)
.process(new GenericExceptionProcessor())
.end()
.setHeader(Exchange.HTTP_METHOD, simple(POST))
.setHeader(Exchange.CONTENT_TYPE, 
simple(application/x-www-form-urlencoded))

.to(https://dev-sdsservices-was8/IMSDSWebService/servlet/SDSClientRequestServlet;
+ 
?proxyHost=VDDP03C-EDB4ED9proxyPort=httpClient.authenticationPreemptive=true
+ authMethod=BasicauthUsername=authPassword=)
+ 
serviceType=getNextIDFromDBserviceID=1dataElementID=814dataSourceID=50
.to(file:{{sf.archive.dir}}?fileName=sds-response.xml)
.end();

The request is made using the POST method -- verified with Fiddler.  However, 
the parameters are being sent as a query string on the URL.  I am successfully 
calling the service, however, an error is returned because the service requires 
POST parameters.

I would appreciate any help with POSTing the parameters 
(serviceType=getNextIDFromDBserviceID=1dataElementID=814dataSourceID=50) 
to the service.



Camel - CDI and Servlet Context Implementation

2015-03-19 Thread Naveen Subramanian
Hi,

I have implemented Camel with Servlet implementation using ServletContext.
I wish to implement CDI as well (which needs CdiCamelConext).

I am unable to find a way to implement both. Please suggest.


My web.xml

context-param
param-namerouteBuilder-routes/param-name
param-valuepackagescan:com.example.api.routes/param-value
/context-param

context-param
param-nameCamelContextLifecycle/param-name
param-valuecom.example.api.camel.CustomCamelContextLifeCycle/param-value
/context-param
listener
listener-classorg.apache.camel.component.servletlistener.SimpleCamelServletContextListener/listener-class
/listener


!-- Servlet mapping --

servlet
display-nameAPIServerServlet/display-name
servlet-nameCamelServlet/servlet-name
servlet-classorg.apache.camel.component.servlet.CamelHttpTransportServlet/servlet-class
load-on-startup1/load-on-startup
/servlet

servlet-mapping
servlet-nameCamelServlet/servlet-name
url-pattern/*/url-pattern
/servlet-mapping



(P.S no Spring )


Getting information about the route and step while executing a step

2015-03-19 Thread L F
Hello, 
I have configured a camel context with tracing, and configured an endpoint 
(activemq topic) where it should send the trace message. The message itself is 
sent to the specified topic, buti see no information related to the context, 
route which is executing or the current step. 
 Is there a way to get these information (route, step, context) while a route 
is executed ?
Regars, 
Laji



Re: Http Component Post Parameters

2015-03-19 Thread Willem Jiang
Hi,

When you use the content-type of application/x-www-form-urlencoded”, you are 
supposed to send the parameters in message body instead of using URL options. 
You can find more information here[1]

Please put paramters into the message body by using setBody DSL 

setBody(serviceType=getNextIDFromDBserviceID=1dataElementID=814dataSourceID=50”)

[1]http://stackoverflow.com/questions/14551194/how-are-parameters-sent-in-an-http-post-request

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 20, 2015 at 6:56:38 AM, Alden, John (john.al...@libertymutual.com) 
wrote:
 Hi all, I'm having some trouble making a REST service call with POST 
 parameters. I saw  
 a similar post but I didn't understand the solution and I need some more 
 direction.
  
 http://camel.465427.n5.nabble.com/Http-Component-Sending-Post-Parameters-td5740321.html#a5740409
   
  
 The following is my route configuration.
  
 from(timer://runOnce?repeatCount=1)
 .onException(Exception.class)
 .handled(true)
 .process(new GenericExceptionProcessor())
 .end()
 .setHeader(Exchange.HTTP_METHOD, simple(POST))
 .setHeader(Exchange.CONTENT_TYPE, 
 simple(application/x-www-form-urlencoded))  
 .to(https://dev-sdsservices-was8/IMSDSWebService/servlet/SDSClientRequestServlet;
   
 + 
 ?proxyHost=VDDP03C-EDB4ED9proxyPort=httpClient.authenticationPreemptive=true
   
 + authMethod=BasicauthUsername=authPassword=)
 + 
 serviceType=getNextIDFromDBserviceID=1dataElementID=814dataSourceID=50  
 .to(file:{{sf.archive.dir}}?fileName=sds-response.xml)
 .end();
  
 The request is made using the POST method -- verified with Fiddler. However, 
 the parameters  
 are being sent as a query string on the URL. I am successfully calling the 
 service, however,  
 an error is returned because the service requires POST parameters.
  
 I would appreciate any help with POSTing the parameters 
 (serviceType=getNextIDFromDBserviceID=1dataElementID=814dataSourceID=50)
   
 to the service.
  
  



Re: StackOverflowException for route (using cxf component) sending to soap endpoint

2015-03-19 Thread Willem Jiang
How did you use the camel-cxf endpoint? I didn’t see any route about it.
From the stack trace I can tell CXF wants to create a new HttpClient for 
sending the message and then the StackOverflowException is thrown.

I just did quick search about this kind of StackOverflowException, I got 
these[1][2]. In a world can you try to add “-Xss256k” option when you start the 
JVM which runs camel application?

[1]http://www.onkarjoshi.com/blog/209/using-xss-to-adjust-java-default-thread-stack-size-to-save-memory-and-prevent-stackoverflowerror/
[2]https://issues.apache.org/jira/browse/CASSANDRA-4275

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 20, 2015 at 12:48:56 AM, dermoritz (tantea...@hotmail.com) wrote:
 Today we got an StackoverflowException for an route that worked some month in
 production. The route does (pseudo code):
  
 from(file).unmarshal().gzip().unmarshal().split().tokenize(\r\n|\n|\r).unmarshal().json()
   
 .process(rtdmProcessor)
 .process(rtdmSetNameFactory.get(rtdmTargetEvents)).id(RTDM_EVENT_PROCESSOR_PREFIX+rtdmTargetEvents)
   
  
 We send buffered objects (gz, json) from hard drive to a soap endpoint
 (commercial software). Before the exception occurs we get many (some
 thousand, 2,3 per second) Faults from Soap but we ignore them (custom
 ErrorHandler and only log them) Please see here for those errors (first few
 lines) and exception: https://gist.github.com/dermoritz/209e7158e41e02849843  
  
  
 The only hints to our code are:
 
 [bufferToRtdm file:] [process18 ]
 [com.example.cep.beans.GenerateInputForRtdm@2d16aa9e
 ] [ 0]
 [bufferToRtdm file:] [process19 ]
 [com.example.cep.beans.RtdmSetEventName@662ec6a8
 
  
 Those processors were not touched for some month. The first creates an xml
 object (bases on generated code from wsdl) the 2nd only sets one attribute
 in this xml.
 My idea is that this exception somehow is related to the many many Faults
 handled before?! Since there is no reals hint to lines in our code i hope
 someone of you can help.
  
 thanks in advance
  
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/StackOverflowException-for-route-using-cxf-component-sending-to-soap-endpoint-tp5764460.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Aggregator - Problem with accepting files for second time

2015-03-19 Thread Angela
Hi,

i've written following route:

c:from
uri=file://abc?noop=trueamp;initialDelay=3amp;include=(grib?|md5)
/
c:aggregate groupExchanges=true completionSize=2
c:correlationExpression
c:simple${file:onlyname.noext}/c:simple
/c:correlationExpression
c:process ref=checkMD5Processor /
..
/c:aggregate

For the first arriving of each file it works as expected. But if the same
two files arriving again (for example xy.grib and xy.md5) the aggregation
doesn't start for a long time (in our example the second processing starts
after 2 days).

Does anybody knows the reason and/or the aggregator options for stopping
this behavior.

Thanks,
Angela



--
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Problem-with-accepting-files-for-second-time-tp5764443.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Relay Message from a normal TCP end-point to Websocket endpoint in camel

2015-03-19 Thread vsk




--
View this message in context: 
http://camel.465427.n5.nabble.com/Relay-Message-from-a-normal-TCP-end-point-to-Websocket-endpoint-in-camel-tp5764278p5764445.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel production use

2015-03-19 Thread vsk
Hi
We are currently considering camel for production use in our application 
Do anybody have any experience in creating few hundreds of routes for some
asynchronous data collection and processing??
Appreciate if some example be shared on live deployments



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


How to view the crypto signed messages

2015-03-19 Thread Sag21
Is there any way to look or log signed message through camel - crypto
component.

I am digitally signing message like below

.to(crypto:sign://rsa?algorithm=SHA1withRSA) which uses 

context.getEndpoint(crypto:sign://rsa?algorithm=SHA1withRSA,
DigitalSignatureEndpoint.class).setPrivateKey(privateKey);
context.getEndpoint(crypto:verify://rsa?algorithm=SHA1withRSA,
DigitalSignatureEndpoint.class).setPublicKey(publicKey);

1. I would like to see what signature got added in message header to verify
if it's correct.

2. I am doing .to(crypto:verify//rsa?algorithm=SHA1withRSA) which is
failing with /Cannot verify signature as no Public Key or Certificate has
been supplied/ anyway 
If message got signed in (crypto:sign) then there should be way to log that
in console.

So Any suggestions?

Thanks appreciate your ime.



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-view-the-crypto-signed-messages-tp5764461.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Aggregator - Problem with accepting files for second time

2015-03-19 Thread Claus Ibsen
Hi

You have noop=true, so camel wont pickup the same files again - its in
idempotent mode.

You can try setting the idempotent key to include the file size as shown on
http://camel.apache.org/file2

Then if the files are changed it should pickup them again.



On Thu, Mar 19, 2015 at 2:01 PM, Angela
angela.wick...@iwes.fraunhofer.de wrote:
 Hi,

 i've written following route:

 c:from
 uri=file://abc?noop=trueamp;initialDelay=3amp;include=(grib?|md5)
 /
 c:aggregate groupExchanges=true completionSize=2
 c:correlationExpression
 c:simple${file:onlyname.noext}/c:simple
 /c:correlationExpression
 c:process ref=checkMD5Processor /
 ..
 /c:aggregate

 For the first arriving of each file it works as expected. But if the same
 two files arriving again (for example xy.grib and xy.md5) the aggregation
 doesn't start for a long time (in our example the second processing starts
 after 2 days).

 Does anybody knows the reason and/or the aggregator options for stopping
 this behavior.

 Thanks,
 Angela



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Aggregator-Problem-with-accepting-files-for-second-time-tp5764443.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Camel production use

2015-03-19 Thread boday
yes.  do you have any specific questions about creating routes?  

on the deployment side, Camel can be embedded in any existing Java app, run
in Tomcat, in OSGi or standalone mode...

I generally use Tomcat and Spring to bootstrap the context:
http://camel.apache.org/servlet-tomcat-example.html

otherwise, here are some other simple deployment examples:
http://java.dzone.com/articles/apache-camel-deployment-modes



vsk wrote
 Hi
 We are currently considering camel for production use in our application 
 Do anybody have any experience in creating few hundreds of routes for some
 asynchronous data collection and processing??
 Appreciate if some example be shared on live deployments





-
Ben O'Day
IT Consultant -http://consulting-notes.com

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


StackOverflowException for route (using cxf component) sending to soap endpoint

2015-03-19 Thread dermoritz
Today we got an StackoverflowException for an route that worked some month in
production. The route does (pseudo code):

from(file).unmarshal().gzip().unmarshal().split().tokenize(\r\n|\n|\r).unmarshal().json()
.process(rtdmProcessor)
.process(rtdmSetNameFactory.get(rtdmTargetEvents)).id(RTDM_EVENT_PROCESSOR_PREFIX+rtdmTargetEvents)

We send buffered objects (gz, json) from hard drive to a soap endpoint
(commercial software). Before the exception occurs we get many (some
thousand, 2,3 per second) Faults from Soap but we ignore them (custom
ErrorHandler and only log them) Please see here for those errors (first few
lines) and exception: https://gist.github.com/dermoritz/209e7158e41e02849843


The only hints to our code are:

[bufferToRtdm file:] [process18 ]
[com.example.cep.beans.GenerateInputForRtdm@2d16aa9e   
] [ 0]
[bufferToRtdm file:] [process19 ]
[com.example.cep.beans.RtdmSetEventName@662ec6a8


Those processors were not touched for some month. The first creates an xml
object (bases on generated code from wsdl) the 2nd only sets one attribute
in this xml.
My idea is that this exception somehow is related to the many many Faults
handled before?! Since there is no reals hint to lines in our code i hope
someone of you can help.

thanks in advance




--
View this message in context: 
http://camel.465427.n5.nabble.com/StackOverflowException-for-route-using-cxf-component-sending-to-soap-endpoint-tp5764460.html
Sent from the Camel - Users mailing list archive at Nabble.com.