Rép. : Re: Camel-ftp timeout

2015-03-18 Thread Thierry RABUEL
Hello,
 
To be more precise, by default the URI parameter passiveMode is
false, so, the default mode is Active mode.
Then, when working in firewalled environment, it can help to set
passiveMode=true

Regards,

Thierry

 


De : François LIOTfrancois.l...@poplidays.com
À :users@camel.apache.org users@camel.apache.org,
morgan.haut...@gmail.com morgan.haut...@gmail.com
Date : 17/03/2015 22:40
Objet : Re: Camel-ftp timeout
Hi,

I invite you to check very carefully FileZilla debug trace,
Maybe you switch in FTP Active Mode without having configured it
yourself, then it works better than expected

Abut Camel FTP, Default is active mode (false). !!!
https://camel.apache.org/ftp.html#FTP-URIOptions 


François Liot

​


From: Morgan Hautman morgan.haut...@gmail.com
Sent: Tuesday, March 17, 2015 9:59 PM
To: users@camel.apache.org 
Subject: Camel-ftp timeout

Hi guys,

I'm trying to connect to an ftp but it doesn't retreive anything from
the directory.
I'm able to connect via FileZilla and download the file(s) but not
with
camel.

from(ftp://user@host:21/in?password=***;)

When you use Filezilla you can query a map or a file and right click
on
it and select Copy Url(s) to clipboard.
This url I have in my clipboard is the same I'm using with Camel-ftp.

ftp://user@host:21/in 

When I run the route I have a :

[INFO ]: org.apache.camel.component.file.remote.FtpConsumer -
Connected
and logged in to: ftp://user@host:21 

but after 30 seconds (camel default) I get a time-out.

Anyone already seen this behavior or has any hints? (I already tried
binary=true)

[WARN ]:
org.apache.camel.component.file.remote.RemoteFilePollingConsumerPollStrategy
- Trying to recover by disconnecting from remote server forcing a
re-connect at next poll: ftp://user@host:21 
[WARN ]: org.apache.camel.component.file.remote.FtpConsumer - Consumer
FtpConsumer[ftp://user@host:21/in?password=xx] failed polling
endpoint: Endpoint[ftp://user@host:21/in?binary=truepassword=xx].
Will try again at next poll. Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
File operation failed: 125 Data connection already open; Transfer
starting.
  Accept timed out. Code: 125]
org.apache.camel.component.file.GenericFileOperationFailedException:
File operation failed: 125 Data connection already open; Transfer
starting.
  Accept timed out. Code: 125
 at
org.apache.camel.component.file.remote.FtpOperations.listFiles(FtpOperations.java:784)
 at
org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:91)
 at
org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:53)
 at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:119)
 at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
 at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
 at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
 at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
 at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
 at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: Accept timed out
 at java.net.PlainSocketImpl.socketAccept(Native Method)
 at
java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
 at java.net.ServerSocket.implAccept(ServerSocket.java:530)
 at java.net.ServerSocket.accept(ServerSocket.java:498)
 at
org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:832)
 at
org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:759)
 at
org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3293)
 at
org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3271)
 at
org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2930)
 at
org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2977)
 at
org.apache.camel.component.file.remote.FtpOperations.listFiles(FtpOperations.java:777)
 ... 12 more


Re: Camel ActiveMQ In/OUT endpoint creates additional consumers on response queue which are more than maxConcurrentConsumers

2015-03-18 Thread agentalpha
Thank you for the quick reply Claus.

I have one more question regarding my issues.
Trying to dig some more in the camel activemq in/out messaging behaviour,
here are some more results that I needed help to understand.

I tried using the route the I have given above using two karaf instances
(kind of clustered environment).
The route reads a request from CXF endpoint and sends the request to IN/OUT
active endpoint, receives the response back and sends it back to the CXF
endpoint.

When I'm running only a single karaf instance (one cluster) then everything
works fine. I have 15 consumers created on the request and response queue
(concurrentConsumers and maxConcurrentConsumers are 15 in my case) in
separate unique session (maxACtiveSessionPerConnection is -1 and
maxConnections are 10).
The request is sent to the requestQueue, the response is fetched and mapped
to the request using correlationId (all of this is taken care by Camel
ACtiveMQ - no customized code from my side on top of it).

When I start the second karaf instance (cluster2), it creates its additional
set of 15 consumers (resulting to a total of 30) on the request and response
Queue. And this is where the problem starts.
After this when I send a request, sometimes, it is put in the request queue
(verified from ActiveMQ web console, I can see the message in the queue and
enqueue count is incremented by 1) but even though that queue has 30
consumers, no one picks up the message and it is moved to DLQ after
expiration.

Sometimes, if the message is processed by the consumer of the request queue,
it puts the response on the response queue but now I get response received
for unknown correlationId and right after the timeout, I see
ExchangeTimedOut exception for the same correlation id for which the
response was received above and QueueReplyMAnager was not able to map it to
the correct request.

I want to understand how this works internally. If there is any
book/guide/blog where I can read/understand this, it will be of a great help
to me.

So far my analysis is that, KAraf instance 1, creates 15 consumers each
having its own session as part of one connection. When I start Karaf 2, it
creates a second connection to the broker and thus having 15 concurrent
consumers each having same session as the 15 consumers of karaf 1 (verified
this from activemq webconsole - active consumers list on the queue). So each
session now has 2 consumers.

I'm using in memory persistent for ActiveMQ broker.

Even if this the case, ideally, any one of the consumer should be able to
consume the message no matter which Karaf instance's producer sent the
message to that queue. So all producers should be able to put the message
and any one of the consumers should be able to read the message process it
and also map the correlation id to the original request.
But this is not happening. Why is so? And what is the correct approach or
configuration to solve this problem?

Many Thanks.

BR!
Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-ActiveMQ-In-OUT-endpoint-creates-additional-consumers-on-response-queue-which-are-more-than-mas-tp5764288p5764344.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel - CDI and Servlet Context Implementation

2015-03-18 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 )


Message filter on Camel nabble

2015-03-18 Thread Gnanaguru S
Can we write a poller, on a regular interval which keeps looking for junk
posts ?

Or a message filter which doesn't allow these useless posts ? Am sure a set
of apache projects can make these forums more intelligent. 

Its very annoying and polluting. 

Cheers
Guru
@tallguru



--
View this message in context: 
http://camel.465427.n5.nabble.com/Message-filter-on-Camel-nabble-tp5764340.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Issue with Camel Crypto Signing

2015-03-18 Thread cgiera
Try to debug the crypto component and see if the jks file is referenced
correctly.

kind regards,
Christoph



--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-Camel-Crypto-Signing-tp5764289p5764343.html
Sent from the Camel - Users mailing list archive at Nabble.com.


using camel metrics but need to persist metrics

2015-03-18 Thread aidatechinc
Hello,
 I am using the camel metrics, but we have a need to persist the metrics in
the database?  I was thinking of creating my own component but thought maybe
there is a better way to customization?



--
View this message in context: 
http://camel.465427.n5.nabble.com/using-camel-metrics-but-need-to-persist-metrics-tp5764349.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Issue with Camel Crypto Signing

2015-03-18 Thread Colm O hEigeartaigh
The likely scenario is that your keystore cannot be found on the classpath.
Does the Camel crypto component work with the 
http://springcryptoutils.com/schema/crypt; keystore? Here is a spring
config that does work, that uses the camel:KeyStoreParameters instead:

https://github.com/coheigea/testcases/blob/master/apache/camel/camel-crypto/src/test/resources/camel-signature.xml

Colm.

On Wed, Mar 18, 2015 at 12:32 PM, cgiera christoph.gi...@mic-cust.com
wrote:

 Try to debug the crypto component and see if the jks file is referenced
 correctly.

 kind regards,
 Christoph



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Issue-with-Camel-Crypto-Signing-tp5764289p5764343.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com


prevent header duplication for csv file

2015-03-18 Thread chaituu
headers are getting duplicated for every request.I needed to append values to
the existing file with header should display once at the top.

 used @CsvRecord(separator = ,, crlf = UNIX,generateHeaderColumns=true)
for csv component.


camelContext xmlns=http://camel.apache.org/schema/spring;
dataFormats
bindy type=Csv
packages=org.camelcookbook.transformation.csv.model id=csvReport/
 /dataFormats
route
from uri=cxf:bean:orderEndpoint /
  process ref=orderWebService /
  wireTap  uri=seda:generateCSV/
   /route
   
route
from uri=seda:generateCSV/
bean ref=generateCSV method=transFormToOrderCSV/
marshal ref=csvReport/
to uri=file:target/messages?fileName=
${date:now:MMdd}/TEST_${date:now:MMdd}.csvamp;fileExist=Append/ 
   
/route



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


Re: MethodInfo evaluate expression

2015-03-18 Thread Claus Ibsen
Hi

I think we fixed that in the next release, eg 2.15.1

On Wed, Mar 18, 2015 at 5:00 PM, richardgroote richard.gro...@gmail.com wrote:
 Hello,

 We're trying to split the body at a specific position with the below
 statement.

 from(direct:abc).setHeader(tmp,
 constant((?=\\G.{3}))).setBody(simple(${body.split(${header.tmp})}));

 The above does not work because the regular expression contains ')'.
 Within the MethodInfo#evaluate the method parameters are determined. This is
 done with the ObjectHelper.between(methodName, (, )) and than the
 regular expression is not correctly anymore.

 A solution for the above is to create a bean which does the splitting and
 refer this bean in the splitter.


 Kind regards,

 Richard







 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/MethodInfo-evaluate-expression-tp5764359.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/


MethodInfo evaluate expression

2015-03-18 Thread richardgroote
Hello,

We're trying to split the body at a specific position with the below
statement.

from(direct:abc).setHeader(tmp,
constant((?=\\G.{3}))).setBody(simple(${body.split(${header.tmp})}));

The above does not work because the regular expression contains ')'.
Within the MethodInfo#evaluate the method parameters are determined. This is
done with the ObjectHelper.between(methodName, (, )) and than the
regular expression is not correctly anymore.

A solution for the above is to create a bean which does the splitting and
refer this bean in the splitter.


Kind regards,

Richard







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


Re: Issue with Camel Crypto Signing

2015-03-18 Thread Sag21
Atlast cookbook example was working correctly today and the error which I
received was somewhat misleading ;) see the different error when doing the
signing part

just FYI it may help somebody else.

1.If there is issue with JKS file password.
java.io.IOException: Keystore was tampered with, or password was incorrect
2. If issue with the certificate password 
unrecovarable key issue.
3. If issue (type or wrong alias) with the alias  which you use for signing
the exchange.
Cannot sign message as no Private Key has been supplied. Either supply
one in the route definition 
sign(keystore, alias) or sign(privateKey) or via the message header
'CamelSignaturePrivateKey'. 

So when I corrected my alias it was giving me error as 
java.security.InvalidKeyException: No installed provider supports this key:
sun.security.rsa.RSAPrivateCrtKeyImpl

So anybody know how we can use the boncycastle in Camel? Any suggestions why
I am getting above error.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-Camel-Crypto-Signing-tp5764289p5764365.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Issue with Camel Crypto Signing

2015-03-18 Thread Sag21
Atlast cookbook example was working correctly today and the error which I
received was somewhat misleading ;) see the different error when doing the
signing part 

just FYI it may help somebody else. 

1.If there is issue with JKS file password. 
java.io.IOException: Keystore was tampered with, or password was incorrect 
2. If issue with the certificate password in signing tag 
unrecovarable key issue. 
3. If issue (type or wrong alias) with the alias  which you use for signing
the exchange. 
Cannot sign message as no Private Key has been supplied. Either supply
one in the route definition 
sign(keystore, alias) or sign(privateKey) or via the message header
'CamelSignaturePrivateKey'. 

So when I corrected my alias it was giving me error as 
java.security.InvalidKeyException: No installed provider supports this key:
sun.security.rsa.RSAPrivateCrtKeyImpl 

So anybody know how we can use the boncycastle in Camel? Any suggestions why
I am getting above error.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-Camel-Crypto-Signing-tp5764289p5764369.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Using Simple language in Spring XML, String.replaceAll with regex grouping throws Exception

2015-03-18 Thread meetdevang
Hi,

Based on the
http://camel.465427.n5.nabble.com/String-replacement-via-Spring-td5719498.html
I am sucessfully able to run a simple example of String.replaceAll

However, when I attempt to execute the route 
route id=testtransform
from uri=file://input /
convertBodyTo type=java.lang.String/
transform
simple${body.replaceAll(foo([A-Z])bar, 
bar$1foo)}/simple
/transform
to uri=file://transformed /
/route

I get the following exception
Stacktrace
---
org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to
invoke method: .replaceAll(foo([A-Z])bar, bar$1foo) on null due to:
org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to
invoke method: replaceAll(foo([A-Z])bar, bar$1foo) on null due to:
java.util.regex.PatternSyntaxException: Unclosed group near index 10
foo([A-Z]
  ^
at
org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:117)
at
org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:132)
at
org.apache.camel.model.language.ExpressionDefinition.evaluate(ExpressionDefinition.java:121)
at
org.apache.camel.model.language.ExpressionDefinition.evaluate(ExpressionDefinition.java:113)
at
org.apache.camel.builder.ExpressionBuilder$33.evaluate(ExpressionBuilder.java:822)
at
org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:36)
at 
org.apache.camel.builder.SimpleBuilder.evaluate(SimpleBuilder.java:83)
at
org.apache.camel.processor.TransformProcessor.process(TransformProcessor.java:47)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:423)
at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:211)
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:175)
at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.camel.language.bean.RuntimeBeanExpressionException:
Failed to invoke method: replaceAll(foo([A-Z])bar, bar$1foo) on null due
to: java.util.regex.PatternSyntaxException: Unclosed group near index 10
foo([A-Z]
  ^
at
org.apache.camel.language.bean.BeanExpression$OgnlInvokeProcessor.process(BeanExpression.java:285)
at
org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:114)
... 25 more
Caused by: java.util.regex.PatternSyntaxException: Unclosed group near index
10
foo([A-Z]
  ^
at java.util.regex.Pattern.error(Pattern.java:1924)
at java.util.regex.Pattern.accept(Pattern.java:1782)
at java.util.regex.Pattern.group0(Pattern.java:2857)
at java.util.regex.Pattern.sequence(Pattern.java:2018)
at java.util.regex.Pattern.expr(Pattern.java:1964)
at java.util.regex.Pattern.compile(Pattern.java:1665)
at java.util.regex.Pattern.init(Pattern.java:1337)
at java.util.regex.Pattern.compile(Pattern.java:1022)
at java.lang.String.replaceAll(String.java:2162)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at 

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

2015-03-18 Thread Camel Guy
Thank you -- That is helpful but actually I am converting getFromEndpoint
to a string and logging that, but I can stuff most of the information into
routeId. Also, since I can get to exchange via groovy, I can do anything
without resorting to writing a bean, just not conveniently as a one liner
in log.

~ cg

On Wed, Mar 18, 2015 at 1: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/



Re: Using Simple language in Spring XML, String.replaceAll with regex grouping throws Exception

2015-03-18 Thread Claus Ibsen
Yes it should be fixed in Camel 2.15.1

On Wed, Mar 18, 2015 at 7:30 PM, meetdevang meetdev...@gmail.com wrote:
 Hi,

 Based on the
 http://camel.465427.n5.nabble.com/String-replacement-via-Spring-td5719498.html
 I am sucessfully able to run a simple example of String.replaceAll

 However, when I attempt to execute the route
 route id=testtransform
 from uri=file://input /
 convertBodyTo type=java.lang.String/
 transform
 simple${body.replaceAll(foo([A-Z])bar, 
 bar$1foo)}/simple
 /transform
 to uri=file://transformed /
 /route

 I get the following exception
 Stacktrace
 ---
 org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to
 invoke method: .replaceAll(foo([A-Z])bar, bar$1foo) on null due to:
 org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to
 invoke method: replaceAll(foo([A-Z])bar, bar$1foo) on null due to:
 java.util.regex.PatternSyntaxException: Unclosed group near index 10
 foo([A-Z]
   ^
 at
 org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:117)
 at
 org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:132)
 at
 org.apache.camel.model.language.ExpressionDefinition.evaluate(ExpressionDefinition.java:121)
 at
 org.apache.camel.model.language.ExpressionDefinition.evaluate(ExpressionDefinition.java:113)
 at
 org.apache.camel.builder.ExpressionBuilder$33.evaluate(ExpressionBuilder.java:822)
 at
 org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:36)
 at 
 org.apache.camel.builder.SimpleBuilder.evaluate(SimpleBuilder.java:83)
 at
 org.apache.camel.processor.TransformProcessor.process(TransformProcessor.java:47)
 at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
 at
 org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
 at
 org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
 at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
 at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
 at
 org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
 at
 org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:423)
 at
 org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:211)
 at
 org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:175)
 at
 org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
 at
 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
 at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
 at
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
 at
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
 at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:744)
 Caused by: org.apache.camel.language.bean.RuntimeBeanExpressionException:
 Failed to invoke method: replaceAll(foo([A-Z])bar, bar$1foo) on null due
 to: java.util.regex.PatternSyntaxException: Unclosed group near index 10
 foo([A-Z]
   ^
 at
 org.apache.camel.language.bean.BeanExpression$OgnlInvokeProcessor.process(BeanExpression.java:285)
 at
 org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:114)
 ... 25 more
 Caused by: java.util.regex.PatternSyntaxException: Unclosed group near index
 10
 foo([A-Z]
   ^
 at java.util.regex.Pattern.error(Pattern.java:1924)
 at java.util.regex.Pattern.accept(Pattern.java:1782)
 at java.util.regex.Pattern.group0(Pattern.java:2857)
 at java.util.regex.Pattern.sequence(Pattern.java:2018)
 at java.util.regex.Pattern.expr(Pattern.java:1964)
 at java.util.regex.Pattern.compile(Pattern.java:1665)
 at java.util.regex.Pattern.init(Pattern.java:1337)
 at java.util.regex.Pattern.compile(Pattern.java:1022)
 at java.lang.String.replaceAll(String.java:2162)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 

Rabbitmq producer silently failing for invalid rabbit exchange name

2015-03-18 Thread royster
Hi,
I'm using Camel 2.14.2 and have noticed an issues when using the RabbitMQ
component to publish to a RabbitMQ exchange when the endpoint url contains
an invalid exchange name (in this case the RabbitMQ exchange and queues have
already been set up by a separate consumer process so i'm using the
'declare=false' option in the URL).

*Camel Route*
from(file:in?fileName=in.txt).log(LoggingLevel.DEBUG, in
here!).to(rabbitmq://127.0.0.1:5762/customerchannel.exchang?declare=falsepassword=xxusername=testuservhost=/)




The route start without error and on the first execution i'm not receiving
any errors (although if I check the Rabbit logs I can see the connection is
still open but the channel has been closed due to the exchange not existing:

*RabbitMQ log*
Channel error on connection 0.3468.0 (127.0.0.1:56575 - 127.0.0.1:5762,
vhost: '/', user: 'testuser'), channel 1:
{amqp_error,not_found,no exchange 'customerchannel.exchang' in vhost '/',
'basic.publish'}

No error is thrown in Camel.

On the subsequent invocations of the route, I do receive an error:

*Application Log*
2015-03-19 11:22:46.163 ERROR 9240 --- [0.1-8890-exec-3] d:sendNotification 
 
: Server Error: channel is already closed due to channel error; protocol
method: #methodchannel.close(reply-code=404, reply-text=NOT_FOUND - no
exchange 'customerchannel.exchang' in vhost '/', class-id=60, method-id=40)

therefore the first fail is silent and the message is lost.

Thanks
Roy




--
View this message in context: 
http://camel.465427.n5.nabble.com/Rabbitmq-producer-silently-failing-for-invalid-rabbit-exchange-name-tp5764383.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Getting a javax.jms.JMSException: java.io.InterruptedIOException

2015-03-18 Thread anukumar004
Hi, 

We are using apache camel to route messages to activemq queues. These
messages are synchronous and use request-reply (ExhcangePattern.InOut) with
a timeout of 20 secs.  The messages get created from a web application
depolyed on tomcat. Everything works great most of the time but when too
many messages get created at once, we see the following exception - 
org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occured during JMS processing; nested exception is javax.jms.JMSException:
java.io.InterruptedIOException
at
org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
at
org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
at 
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:228)
at 
org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:427)
at
org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:233)
at 
org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:150)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at
org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:73)
at
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:378)
at
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:346)
at 
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:242)
at 
org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:346)
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:201)
at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128)
at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:115)
at
org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeader(DefaultProducerTemplate.java:182)
at
org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeader(DefaultProducerTemplate.java:301)
at
broker.service.ServiceRequestSenderImpl.send(ServiceRequestSenderImpl.java:50)
at
.controllers.remote.UsersDataController.getStatus_aroundBody1$advice(UsersDataController.java:63)
at
controllers.remote.UsersDataController.loadDataList(UsersDataController.java:77)
at
controllers.remote.UsersDataController.loadOverview(UsersDataController.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
at
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
at
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
at

Getting the routeId in a PollingConsumer via a custom PollingStrategy

2015-03-18 Thread Camel Guy
Ideally, Camel error handling would work with PollingConsumers when the
poll failed. For example, a bad password is provided to the mail component.
In that case I would like to invoke an endpoint.

Or, there would be an option to make the route process an empty body.

Neither are possible so I have implemented a PollingStrategy.

Ideally, rollback() would be able to invoke an endpoint. That doesn't seem
to be possible either.

When failure occurs, I need to call consumer.stop() and then remove the
route from the CamelContext. Unfortunately, I don't seem to be able to get
the routeId from rollback(). Have I overlooked something simple?



Thanks,
~cg


Re: Getting the routeId in a PollingConsumer via a custom PollingStrategy

2015-03-18 Thread Claus Ibsen
Hi

You can bridge the error handler
http://camel.apache.org/why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.html

On Wed, Mar 18, 2015 at 11:55 PM, Camel Guy ca...@devguy.com wrote:
 Ideally, Camel error handling would work with PollingConsumers when the
 poll failed. For example, a bad password is provided to the mail component.
 In that case I would like to invoke an endpoint.

 Or, there would be an option to make the route process an empty body.

 Neither are possible so I have implemented a PollingStrategy.

 Ideally, rollback() would be able to invoke an endpoint. That doesn't seem
 to be possible either.

 When failure occurs, I need to call consumer.stop() and then remove the
 route from the CamelContext. Unfortunately, I don't seem to be able to get
 the routeId from rollback(). Have I overlooked something simple?



 Thanks,
 ~cg



-- 
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: Hlep Please - TransactionErroHandler/retry/DLC issues. Stuck

2015-03-18 Thread mattmadhavan
Hello,
*Please note that I am Using JTA Transaction Manager* (Bitronix standalone)
and JBoss server.

Thanks
Matt



-
Thanks
Matt G. Madhavan
--
View this message in context: 
http://camel.465427.n5.nabble.com/Hlep-Please-TransactionErroHandler-retry-DLC-issues-Stuck-tp5764363p5764366.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Hlep Please - TransactionErroHandler/retry/DLC issues. Stuck

2015-03-18 Thread mattmadhavan
Hello,
I have been having few issues with my TransactionErrorHandler. It does not
seem to work as expected. More than like likely I am not configuring
properly.

I want to handle the retry and the DLC at the application level (Camel
level) and not at the Transport level (AMQ). It looks for retry and dlc my
TransactionErrorHandler configuration does not have any control at all. 

* The retry count, retry intervel, the DLC channel all come from my default
broker configuration.
* I don't have the Exception that caused the retry.

I really need to handle the retry logic at the application level. I am bacth
processing 1000 records at a time. If I get an exception I want the message
to be routed to my DLC channel where another thread can pick it up break the
page size from 1000 records into 1 record at a time and do the rote again.

Can some one advise on the confiuguration? The following is the
configuration I have  - whats wrong with it?



The config:
property name=lt;bdeadLetterUri
value=activemq:queue:WH-IDK-work.DLQ */
and 
property name=lt;bmaximumRedeliveries value=4* /

seem to have no effect at ll as ActiveMQ is fully in charge of retries and
DLC/

I do see this in the log.


It does mean that the redelivery is in fact orchestrated by AMQ (coarse
grained) and not by Camel (fine grained) as a Read from the Queue is
beginning of the JTA transaction. 



I am not even sure why the re-delivery? I would like to fix it. By the time
the message ends in the AMQ DLC I have no idea! :(

Any help is really appreciated. Camel is great. *Everything I have learnt
and used is great! Just this pesky TransactionErrorHandling*  

Thanks in advance!

Matt



-
Thanks
Matt G. Madhavan
--
View this message in context: 
http://camel.465427.n5.nabble.com/Hlep-Please-TransactionErroHandler-retry-DLC-issues-Stuck-tp5764363.html
Sent from the Camel - Users mailing list archive at Nabble.com.


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

2015-03-18 Thread Camel Guy
${exchange} doesn't seem to work


Thanks,
~dg


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

2015-03-18 Thread Claus Ibsen
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/


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

2015-03-18 Thread Claus Ibsen
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/


Re: Java DSL kick-starting routes, is this possible yet?

2015-03-18 Thread mikes300
Actually Yogesh, 
I may have just figured out my own answer here, and I have been fighting
this for months.  I was operating under the assumption that I should be
stopping the route.  And in all my tests I always stopped the route. 
Figuring that if I was creating the object, i needed to take care of it,
stop the route, etc.  But apparently not.  Simply by starting it, letting it
run, it will eat whatever messages you send to it (a queue is the input
endpoint), each as a separate route path.  And I can envision creating
something that initializes all these route instances at startup.  That make
sense?

I hope so, this really may be a breakthrough for me!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Java-DSL-kick-starting-routes-is-this-possible-yet-tp5764227p5764377.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-18 Thread Camel Guy
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/



Re: Camel exec component tokenizer in Spring XML DSL removing plus sign in arguments

2015-03-18 Thread Davis, Daniel
You are right, this worked.  In experiments I had put RAW() around just
the +profile * argument and it did not work.  After wrapping the call
in RAW() I now have a contains unsafe characters, please check
encoding warning which I can work through but the code is passing a
valid argument list to exec.  Its a small issue but I think its bad
form for the tokenizer or encoder to eat all plaintext and encoded forms
of + (I bet handling exec uniformly across all platforms is hard) but
having a way that works is gold.

Thanks,

--
Daniel Davis
Technical Manager, Office of Research Information Services
Smithsonian Institution

On 03/17/2015 09:56 PM, Willem Jiang wrote:
 Camel just replace the “+” with “ “ by default.
 You can use the RAW() to wrap the args parameter just like this.
 exec:test?args=RAW(arg1+arg2 arg3)

 --  
 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 17, 2015 at 11:06:05 PM, Davis, Daniel (davi...@si.edu) wrote:
 I have been unable to find an encoding or approach to include the
 ImageMagick argument +profile in the argument list for exec in
 Spring XML DSL as show below. With each experiment Trace clearly shows
 that the + sign in the arguments being stripped out. I tried
 plaintext, HTML and decimal encoding plus some dynamic character
 substitutions. I assume the tokenizer and/or the encoder for the
 arguments is eating the +. Other than the problem argument this
 exec is working fine.
  
 Does anyone know a good approach, a workaround or an error I made in
 Spring DSL before I move to the Java DSL for this one?
  
  
  
  
  
 exec:convert?args=${header.CamelFileNameProduced} -thumbnail
 200x150 -colorspace RGB +profile * ${header.CamelFileNameProduced}.jpg
  
  
  
  
 --
 Daniel Davis
  
  




Re: Issue with Camel Crypto Signing

2015-03-18 Thread Sag21
To resolve issue
java.security.InvalidKeyException: No installed provider supports this key:
sun.security.rsa.RSAPrivateCrtKeyImpl

Tried with the url to uri=crypto:sign://basic?privateKey=#myPrivateKey /
but that doesn't worked.

Then changed the url to 
.to(crypto:sign://provider?privateKey=#myPrivateKeyprovider=SUN)
which worked up to some extent but thrown the below error. 

*java.security.InvalidKeyException: not a DSA private key: Sun RSA private
CRT key, 2048 bits*

Any suggestion/direction guys what I suppose to try.

Tried with below option not worked.
to
uri=crypto:sign://rsa?algorithm=MD5withRSAamp;privateKey=#rsaPrivateKey
/
to uri=crypto:sign://rsa?algorithm=
SHA1withRSAamp;privateKey=#rsaPrivateKey /

This is what did the trick 

   keyPair = getKeyPair(RSA);
PrivateKey privateKey = keyPair.getPrivate();
PublicKey publicKey = keyPair.getPublic();
CamelContext context =  getContext();
// we can set the keys explicitly on the endpoint instances.
context.getEndpoint(crypto:sign://rsa?algorithm=SHA1withRSA,
DigitalSignatureEndpoint.class).setPrivateKey(privateKey);
context.getEndpoint(crypto:verify://rsa?algorithm=SHA1withRSA,
DigitalSignatureEndpoint.class).setPublicKey(publicKey);

from(direct:sign)
.log(Signing message)
.to(crypto:sign://rsa?algorithm=SHA1withRSA)


Anybody know how to see the signed message.?




--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-Camel-Crypto-Signing-tp5764289p5764380.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Hazelcast Component creating multiple instances of Hazelcast

2015-03-18 Thread ayache.k
Hi Willem

Thanks for your prompt response. The support for hazelcastInstance is on
camel 2.14 I didn't realise that. I will explore that further. You mentioned
I may need to expose the instance as a service, can you show me an example?
the documentation doesn't sow that.

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Hazelcast-Component-creating-multiple-instances-of-Hazelcast-tp5764283p5764320.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel ActiveMQ In/OUT endpoint creates additional consumers on response queue which are more than maxConcurrentConsumers

2015-03-18 Thread Claus Ibsen
Hi

When doing request/reply over JMS using camel-jms then Camel uses the
concurrentConsumers settings you may have configured on the component
/ endpoint.

So if you only want 1 consumer, then set that on the endpoint

Though I have logged a ticket to allow having separate options for
regular concurrent consumers vs for request/reply
https://issues.apache.org/jira/browse/CAMEL-8503

On Tue, Mar 17, 2015 at 5:09 PM, agentalpha yogesh.l...@gmail.com wrote:
 Hi Everyone,

 We are using Camel 2.13.2 and ActiveMQ 5.9.0.
 The configuration of activemq broker is as follows:
 bean id=activemq
 class=org.apache.activemq.camel.component.ActiveMQComponent
 property name=configuration ref=jmsConfig /
 property name=transacted value=false /
 property name=acceptMessagesWhileStopping value=false /
 property name=cacheLevelName value=CACHE_CONSUMER /
 /bean

 bean id=jmsConnectionFactory
 class=org.apache.activemq.ActiveMQConnectionFactory
 property name=brokerURL value=$[ren.brokerUrl] /
 property name=useAsyncSend value=true /
 /bean

 bean id=pooledConnectionFactory
 class=org.apache.activemq.pool.PooledConnectionFactory
 init-method=start destroy-method=stop
 property name=maxConnections value=10 /
 property name=maximumActiveSessionPerConnection value=-1 
 /
 property name=expiryTimeout value=0 /
 property name=idleTimeout value=0 /
 property name=connectionFactory ref=jmsConnectionFactory 
 /
 /bean

 bean id=jmsConfig
 class=org.apache.camel.component.jms.JmsConfiguration
 property name=connectionFactory 
 ref=pooledConnectionFactory /
 property name=concurrentConsumers value=15 /
 property name=maxConcurrentConsumers value=15 /
 property name=maxMessagesPerTask value=5 /
 property name=idleTaskExecutionLimit value=0 /
 property name=idleConsumerLimit value=0 /
 /bean


 As mentioned, we have concurrent and max concurrent consumers having value
 15.

 We have following route sample:
 route id=openApiRoute trace=true autoStartup=false
 xmlns=http://camel.apache.org/schema/blueprint;
 from uri=openAPI /
 onException
 exceptionjava.lang.Throwable/exception
 handled
 constanttrue/constant
 /handled
 bean ref=errorHandlerBean /
 convertBodyTo 
 type=com.company.openapi.SoapMap /
 /onException
 onException
 exceptionjava.lang.Exception/exception
 handled
 constanttrue/constant
 /handled
 bean ref=errorHandlerBean /
 convertBodyTo 
 type=com.company.openapi.SoapMap /
 /onException
 onException
 
 exceptionorg.apache.camel.ExchangeTimedOutException/exception
 redeliveryPolicy logRetryAttempted=true
 retryAttemptedLogLevel=WARN

 maximumRedeliveries={{ren.context.camel.openApiRoute.maximumRedeliveries}}
 
 redeliveryDelay={{ren.context.camel.openApiRoute.redeliveryDelay}} /
 handled
 simple${header.requestType} != 
 'broadcast'/simple
 /handled
 choice
 when
 simple${header.requestType} 
 != 'broadcast'/simple
 bean ref=errorHandlerBean 
 /
 convertBodyTo 
 type=com.company.openapi.SoapMap /
 /when
 /choice
 /onException

 convertBodyTo type=java.util.Map /
 choice
 when
 simple${header.requestType} == 
 'broadcast'/simple
 bean ref =broadcasterBean/
 recipientList 
 parallelProcessing=true
 strategyRef=aggregatorStrategy streaming=true stopOnException=false
 prop:timeout={{ren.context.camel.httpRoute.aggregatorTimeout}}