Re: Problems using async threads

2013-07-30 Thread Claus Ibsen
Set a lower queue size as that is default 1000. The pool on grows when the queue size is full. This is how the thread pools in the JDK was designed. On Wed, Jul 31, 2013 at 6:01 AM, nprajeshgowda wrote: > Hi, > > Since it is related to the usage of threads, thought of adding my ask to the > same

Re: best practice for logging execution time

2013-07-30 Thread salemi
Claus, I have to figure out how many messages we can put trough one Camel instance. We need to at least manage to route 1000 messages a second. Looking at the JMX stats I see each message takes about 10ms. I was wondering how can Identify where the times are spent and how I can improve my route!

Re: mvn build with -Pfastinstall not enabling noassembly flag?

2013-07-30 Thread Claus Ibsen
On Wed, Jul 31, 2013 at 2:45 AM, Willem jiang wrote: > It looks like setting the properties through the Profile doesn't work. > To work around it we could disable the assembly step by default, but we need > to enable it by using -Passembly when doing deploy and release. > > Any thought? > -1 I

Re: Problems using async threads

2013-07-30 Thread nprajeshgowda
Hi, Since it is related to the usage of threads, thought of adding my ask to the same post. I am using *apache-camel-2.10.2* I see that the thread pool is *NOT growing* .

Re: mvn build with -Pfastinstall not enabling noassembly flag?

2013-07-30 Thread Willem jiang
It looks like setting the properties through the Profile doesn't work. To work around it we could disable the assembly step by default, but we need to enable it by using -Passembly when doing deploy and release. Any thought? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat We

Re: Enums in spring config

2013-07-30 Thread Christian Müller
It works with 2.11.0 [1]. What's the exception do you get? [1] https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=camel-core/src/test/java/org/apache/camel/processor/CBRSimpleTypeTest.java;h=aaf9051b9e97a1971e923f8319b688c8bd80b686;hb=99b5784e1fc5fd529c0178f9a8f60ac37fed5682 Best, Chris

Re: how to consume messages by timestamp

2013-07-30 Thread Christian Müller
I think there is a simpler solution. Use the Apache ActiveMQ schedule delivery option [1]. [1] http://activemq.apache.org/delay-and-schedule-message-delivery.html Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache

Re: Validate Xml

2013-07-30 Thread Raul Kripalani
CXF returns an HTTP 500 with a SOAP Fault indicating an Unmarshalling error if you send invalid XML in the request payload – before even relaying the message to the Camel route. However, what confused me from your explanation is that your Camel error handler was getting triggered. Would you mind

Re: Validate Xml

2013-07-30 Thread Christian Müller
Not answering your question, but why you do not configure CXF to validate the request? Best, Christian Am 30.07.2013 16:16 schrieb "bocamel" : > I recently ran into this scenario. My Camel route acts as a web services > server that receives an XML message in PAYLOAD format. The very next step >

Re: mvn build with -Pfastinstall not enabling noassembly flag?

2013-07-30 Thread Christian Müller
It's the same for me. I think the intention was to skip the assembly step... Feel free to "fix" it. Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https:/

RE: Validate Xml

2013-07-30 Thread bocamel
Raul, Thanks for the suggestion. But unfortunately, it did not help. Camel throws the CamelRuntimeException immediately after (if not part of) the from statement. I do not think the convertBodyTo even had a chance to receive the exchange. So the onException for org.apache.camel.InvalidPa

Re: how to consume messages by timestamp

2013-07-30 Thread Raul Kripalani
Agree. === Method 2: Camel Aggregation EIP with unique ID correlation expression + completionTimeout + persistent aggregation repository === Use an Aggregate EIP with a correlation expression that picks a unique ID (e.g. exchangeId), such that aggregation buckets are always of size 1 each contain

Re: best practice for logging execution time

2013-07-30 Thread Christian Posta
You can also take a look at the Log component which allows you to log groups of exchanges based on number or based on time: from("activemq:orders").to( "log:com.mycompany.order?level=DEBUG&groupInterval=1&groupDelay=6&groupActiveOnly=false" ).to("bean:processOrder"); http://camel.apache.

Re: how to consume messages by timestamp

2013-07-30 Thread Christian Posta
I like Raul's suggestion. It keeps the burden on the broker and the clients can be thin and simple. On the other hand, you could do this on the client side with an aggregator. Just consume messages from a queue as quickly as they come in, and let the aggregator hold on to them for 2 mins and then

RE: Enums in spring config

2013-07-30 Thread Gershaw, Geoffrey
Sorry, I am on 2.11. Sorry for not adding thi Geoffrey A Gershaw Credit eTrading Development +1 919 994 6412 (*102 6412) -Original Message- From: Raul Kripalani [mailto:r...@evosent.com] Sent: Tuesday, July 30, 2013 4:31 PM To: users@camel.apache.org Subject: Re: Enums in spring confi

Re: Camel route only dealing with headers

2013-07-30 Thread Christian Posta
The snippet as i posted works as you've asked. Like I said, if you have other steps, you'll have to consider the spots where Camel expects to convert the message to an exchange body. Calling JmsMessage#getBody will cause the JmsBinding to kick in and try to convert. If you have mapJmsMessage=fals

Re: Enums in spring config

2013-07-30 Thread Raul Kripalani
What Camel version are you on? This feature is available from Camel 2.11 onwards, according to the doc page. Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkrip

Re: Camel route only dealing with headers

2013-07-30 Thread Raul Kripalani
I've quickly skimmed over the relevant source in camel-jms. It looks like Camel reads the message body lazily, only when required. So ObjectMessage.getObject() will only be called when the body is actually required. In AMQ, this is the method that performs the deserialization and would hypothetical

Enums in spring config

2013-07-30 Thread Gershaw, Geoffrey
Hello All, I was under the impression that enums can now be specified in the Spring config as in the below example. Having issues. Any advice? ${header.EventCategory} == ${type:org.apache.camel.component.quickfix.QuickfixjEventCategory.AppMes sageReceived} [pool-1-thread-1] WARN org.apa

Re: how to consume messages by timestamp

2013-07-30 Thread Raul Kripalani
I'll explain a possible solution briefly. === Leverage JMS expiration and ActiveMQ individual Dead Letter Queue === Make your producers send messages with a JMS Time to Live of 2 minutes. If you can't change your producers, implement an AMQ Broker Plugin that will set the expiration inside the br

Re: Validate Xml

2013-07-30 Thread Raul Kripalani
Try converting the body to a Document.class explicitly (before calling the validator) and handling the InvalidPayloadException. For example: onException(InvalidPayloadException.class) .bean(new MyExceptionBean());// or process(Processor p) from("cxf:bean:name") .convertBodyTo(Doc

Re: best practice for logging execution time

2013-07-30 Thread Claus Ibsen
On Tue, Jul 30, 2013 at 12:20 AM, salemi wrote: > I like to identify the average execution time spent in Camel. I have a > aggregator that aggregate 10 messages before it send them out to the > endpoint. > Would EventNotifier still work? > It depends what and how fine grained you want to measure?

Re: Use MessageFilter to process files that are 30 or more days old

2013-07-30 Thread Karim Garza
Thank you for your reply. I tried using the EIP filter and I could not get it to work even after comparing milliseconds to milliseconds. I then tried Christian's suggestion and it work as expected. My route ended up as @Override public void configure() throws Exception { from("file:{{file.inbox}}?

Re: Camel testing

2013-07-30 Thread Willem jiang
Hi You can use replace the jms component with seda component just like this camelContext.addComponent("jms", sedaComponent ); The you don't need to create a new jms connection per test. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http:

Re: Camel route only dealing with headers

2013-07-30 Thread jduncan
Actually that also does not work for object messages. Camel will still try to deserialize the object in the body. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-route-only-dealing-with-headers-tp5736452p5736502.html Sent from the Camel - Users mailing list archive at

Re: Validate Xml

2013-07-30 Thread bocamel
I recently ran into this scenario. My Camel route acts as a web services server that receives an XML message in PAYLOAD format. The very next step in the route after receiving the message is to validate the message using . However, if the input XML message is not well formed, Camel generates a C

Re: Camel route only dealing with headers

2013-07-30 Thread jduncan
I know object messages are not the best, but there are some places in our app that we do still use them. I'm building a simple utility that should be able to take any message, do some header manipulation, and then pass on the message to another consumer. I got my tests to pass by using from("acti

Re: Camel JPA - Clustered Deployment - Quartz Scheduling

2013-07-30 Thread Patrick Bray
Hi DJ, Sorry for the delay in responding I have been away on holiday. Yes we managed to solve this by using the camel-quartz component and a clustered jdbc job store. Let me know if you have any specific questions on implementing this. Thanks, Patrick Bray -- View this message in context: htt

Re: camel rabbitmq

2013-07-30 Thread Claus Ibsen
Hi Thanks for reporting. I am fixing this on master. On Tue, Jul 30, 2013 at 12:43 PM, kiranreddykasa wrote: > Hi > > I tried to use camel-rabbitmq component from 2.12 snapshot. > > Here is my route. > > > from("netty:tcp://0.0.0.0:7000?textline=true").to("rabbitmq://localhost/A?routingKey=B&u

Re: Adding MultiConsumer support to a ScheduledPollEndpoint/ScheduledPollConsumer

2013-07-30 Thread cgiera
Hello, I think I got it. I didn't know that it is possible to add the same Runnable to the ExecuterService multiple times. Thx for your help. kind regards, Christoph -- View this message in context: http://camel.465427.n5.nabble.com/Adding-MultiConsumer-support-to-a-ScheduledPollEndpoint-S

camel rabbitmq

2013-07-30 Thread kiranreddykasa
Hi I tried to use camel-rabbitmq component from 2.12 snapshot. Here is my route. from("netty:tcp://0.0.0.0:7000?textline=true").to("rabbitmq://localhost/A?routingKey=B&username=guest&password=guest"); And I am getting null pointer exception. Here is full stacktrace Stacktrace -

AW: XPath + DOM-reuse

2013-07-30 Thread jhm
Thanks Jan > -Ursprüngliche Nachricht- > Von: Raul Kripalani [mailto:r...@evosent.com] > Gesendet: Dienstag, 30. Juli 2013 12:07 > An: users@camel.apache.org > Betreff: Re: XPath + DOM-reuse > > Just a little tip. Be careful with concurrency as DOM is not thread- > safe. > > So if you'v

Re: AW: Camel testing

2013-07-30 Thread Costash
Hello, Thanks a lot. I did it. (see below) Now i have another question :) My Endpoints are connecting to the real queue, and send the message there. What if i don't want a real connection to a queue,* can the endpoint be somehow virtualize for unit tests*? Ofcourse i can use active MQ instead o

Re: XPath + DOM-reuse

2013-07-30 Thread Raul Kripalani
Just a little tip. Be careful with concurrency as DOM is not thread-safe. So if you've got multiple XPath expressions or XSLT transformations running in parallel (e.g. multicast EIP), you might get errors. Regards, Raúl. On Tue, Jul 30, 2013 at 10:16 AM, Jan Matèrne (jhm) wrote: > Thanks, I wil

Re: PackageScan Activiti Spring

2013-07-30 Thread Claus Ibsen
Hi See http://camel.apache.org/how-do-i-run-activemq-and-camel-in-jboss.html You would still need it if you want to use the package scan functionality. Though you can also just not use the package scan and have it work out of the box in JBoss. On Tue, Jul 30, 2013 at 11:36 AM, ses wrote: > I us

PackageScan Activiti Spring

2013-07-30 Thread ses
I use Camel 2.11 out of Activiti 5.13 (activiti-rest.war) running on a Jboss 7.1.1. My Routes are defined using Java DSL and are in a package in a JAR file which is in the WEB-INF/lib of activiti-rest. The routes aren't found by the packageScan in my camelContext. I get the following stack trace:

AW: XPath + DOM-reuse

2013-07-30 Thread jhm
Thanks, I will try ... Jan > -Ursprüngliche Nachricht- > Von: Claus Ibsen [mailto:claus.ib...@gmail.com] > Gesendet: Dienstag, 30. Juli 2013 11:09 > An: users@camel.apache.org > Betreff: Re: XPath + DOM-reuse > > Hi > > You can convert the body to DOM first > > from > .convertBodyTo(Do

Re: XPath + DOM-reuse

2013-07-30 Thread Claus Ibsen
Hi You can convert the body to DOM first from .convertBodyTo(Document.class) choice Also you can add camel-saxon to the classpath to use saxon as the xpath engine. Its faster than what comes out of the box in the JDK. You can use vtd-xml for an xpath language that can work with streamed dat

XPath + DOM-reuse

2013-07-30 Thread jhm
I have a route dispatching an exchange according to a XPath evaluation to different targets. Sadly it doesnt perform very well. I think that the DOM is built for every XPath evalutation. Is it true? Can we configure Camel to reuse the DOM? I think in this Route Camel builds the same DOM 4 tim

Re: best practice for logging execution time

2013-07-30 Thread Bilgin Ibryam
You can get these kind of statistics using JMX too Did you see http://camel.apache.org/camel-jmx.html Bilgin On 29 July 2013 23:20, salemi wrote: > I like to identify the average execution time spent in Camel. I have a > aggregator that aggregate 10 messages before it send them out to the > endp

Re: Using {date:..} placeholder in camel-context endpoint

2013-07-30 Thread roger_rabbit
Thank you Claus, this worked. Eventually, I ended up changing the whole thing... because I read somewhere that "not every possible use case is a perfect fit in camel"* :) Thus, I will have other problems..

Re: SEDA with PriorityBlockingQueue

2013-07-30 Thread Claus Ibsen
Hi Yes sounds great. Feel free to create a JIRA and work on this. We love contributions http://camel.apache.org/contributing.html On Tue, Jul 30, 2013 at 9:20 AM, gquintana wrote: > I can open a JIRA for creating the queue factory, and then propose a PR if > you wish. > Gérald > > > > -- > View

Re: SEDA with PriorityBlockingQueue

2013-07-30 Thread gquintana
I can open a JIRA for creating the queue factory, and then propose a PR if you wish. Gérald -- View this message in context: http://camel.465427.n5.nabble.com/SEDA-with-PriorityBlockingQueue-tp5736411p5736467.html Sent from the Camel - Users mailing list archive at Nabble.com.