Async processing and number of inflight exchanges issue

2012-01-19 Thread Zhemzhitsky Sergey
Hi gurus, I have the following issue. I need to send requests to webservice from camel on timer events. As timer consumer uses synchronous event firing , only one request can be sent at the same time. What I’d like is use to threads DSL to process multiple timer events at the same time. Here

Re: Camel 2.9.0 integration with CXF2.5.1 Help

2012-01-19 Thread sram
I'm using JAX-WS, and to step back I'm on CXF2.4.1+Camel 2.4.0 (My bad on version typo). My use case is to receive client PAYLOAD, process SOAP header and route to external service for it to process the body and return response. The issue is, when this external service throws an Exception/Fault; it

Re: Camel 2.9.0 integration with CXF2.5.1 Help

2012-01-19 Thread Willem Jiang
Camel move to JDK 1.6 since 2.7.x. Are you using camel-jaxrs component ? I need more information about the "status code 500" error to help you to find a work around. On Fri Jan 20 07:19:34 2012, sram wrote: Our application server is still dependent on Java5. The reason for me to move to Camel

Re: Camel 2.9.0 integration with CXF2.5.1 Help

2012-01-19 Thread sram
Our application server is still dependent on Java5. The reason for me to move to Camel 2.9.0 is to address "status code 500" error thrown when my route endpoint throws an exception. I believe this was addressed in 2.8.3 and above. Am i correct? If so, Is Camel 2.8.3 compliant with Java 5, and shoul

Re: Redelivery with multiple transacted routes

2012-01-19 Thread Babak Vahdat
Digging into Camel code is the best way to find it out. It's Camel doing the redelivery, as the redelivery facility should generally work for all other kinds of components as well and not just ActiveMQ. Babak -- View this message in context: http://camel.465427.n5.nabble.com/Redelivery-with-mul

Re: Redelivery with multiple transacted routes

2012-01-19 Thread kafe
I'm reading again and again the several documentations about transaction and error handling, and i have one more question: when working with the transactionErrorHandler (http://camel.apache.org/transactionerrorhandler.html), and especially when configuring redelivery (maximumRedeliveries(6)...), i

Re: Redelivery with multiple transacted routes

2012-01-19 Thread kafe
Thank you for these precisions. I'll have to make native activemq redelivery work tomorow then ! -- View this message in context: http://camel.465427.n5.nabble.com/Redelivery-with-multiple-transacted-routes-tp5158209p5158921.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Redelivery with multiple transacted routes

2012-01-19 Thread Babak Vahdat
Hi Kafe, that was exactly my intention to make it clear to you that this will NOT be possible as long as your routing logic is transacted. For instance different implementations of Spring's PlatformTransactionManager keep the state of the currently running transaction into a ThreadLocal so that on

Re: Redelivery with multiple transacted routes

2012-01-19 Thread kafe
@Babak : it seems that the asyncDelayedRedelivery option does not apply to transacted routes ("However if you use transacted routes then Camel will block as its mandated by the transaction manager to execute all the work in the same thread context"). But i'll try that to be sure. @Raul : actually,

Re: spagic and Camel

2012-01-19 Thread Christian Müller
I don't know Spagic. Which capabillities Spagic offers? Best, Christian On Thu, Jan 19, 2012 at 11:15 AM, jmh wrote: > Hello, > > simple quesiton : is it possible to use Spagic to monitor Camel components > ? > > Regards > J-M > > -- > View this message in context: > http://camel.465427.n5.nabb

Re: Redelivery with multiple transacted routes

2012-01-19 Thread Raul Kripalani
If you are using JMS transactions, how about rolling back the transaction when an exception occurs, and letting AMQ do the redelivery for you? That way the message will again enter the route at the beginning (from endpoint). You do this by configuring a redelivery policy on the connection factory.

Re: camel-ftp scheduling and limit polling

2012-01-19 Thread Babak Vahdat
Hi, the Leader-Rider has already answered this question of yours [1] by another thread. [1] http://camel.465427.n5.nabble.com/What-s-best-practice-for-running-Camel-2-9-0-in-JBOSS-5-X-tp5138775p5145054.html Babak -- View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-sche

Re: Issue with logging

2012-01-19 Thread Claus Ibsen
Hi You have 2 when in the choice, which means if both when is false, then it will pick otherwise. But you do not have that. So you will not see anything. Add an to have a log in case any of the when fails. And the simple expression in Camel 2.8.x or earlier you must be a bit more exact when usi

Re: What does 'Exchange ending ' mean

2012-01-19 Thread anand sridhar
Thank you Claus. I will use the book to know more. -Anand On Wed, Jan 18, 2012 at 8:54 AM, Claus Ibsen wrote: > Hi > > On Wed, Jan 18, 2012 at 12:03 AM, anand sridhar > wrote: > > I was hoping the community could help me understand the exact meaning of > > 'Exchange ending' as mentioned in Cam

Issue with logging

2012-01-19 Thread ebinsingh
Hi All, For some reason I am not able to see any of the logs defined in the below route. Appreciate your help in solving this. Noticed that if I removed the choice from the second route, all the logging appears in my log file. I need to find out which choice loop is executed.

Re: Redelivery with multiple transacted routes

2012-01-19 Thread Babak Vahdat
Hi, I just copy&paste what the documentation says about this second question of yours: >From Camel 2.4 onwards Camel has a feature to not block while waiting for a delayed redelivery to occur. However if you use transacted routes then Camel will block as its mandated by the transaction manager to

Re: unmarshalling but not marshalling?

2012-01-19 Thread david_good
Sure -- View this message in context: http://camel.465427.n5.nabble.com/unmarshalling-but-not-marshalling-tp5152663p5158434.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Keep the routes created dynamically after restarting

2012-01-19 Thread Nicolas Gapaillard
Hi, Finally, I used my own LifecycleStrategy implementation to persist the routes in xml files (onRoutesAdd,onRoutesRemove,onContextStart) . For the route loading in the context I follow the link. And for the marshalling i took example inside the ModelHelper.dumpModelAsXml for the jaxb marshall

Re: Redelivery with multiple transacted routes

2012-01-19 Thread kafe
The remaining problem is that the thread that makes the redeliveries is blocked until all redeliveries have been done. Potentially, if the redeliveryPolicy is configured to redeliver undefinitely (which will probably be my case in the future) and lot of messages arrive in my initial ActiveMQ queue

Re: Redelivery with multiple transacted routes

2012-01-19 Thread Babak Vahdat
Yeah exactly, all redelivery attempts start at the point of the failure... BTW this behaviour seems to me in synergy with the plain java where you catch an Exception some where in your code and then you continue with the logic right *after* the catch block and not necessarily from the first line o

Re: camel-ftp scheduling and limit polling

2012-01-19 Thread roughrotter
i found the property sendEmptyMessageWhenIdle that can allow me to check in process if no more file are present and stop route by it self. But in that way i have to develop a custom pollingStrategy? -- View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-scheduling-and-l

Re: Redelivery with multiple transacted routes

2012-01-19 Thread Babak Vahdat
I didn't mean to put an onException() on the second route *but* on the global scope, so something like: java.lang.Exception true -- View this message in context: http://camel.465427.n5.nabble.com/Redelivery-with-multiple-transacted-r

Re: Redelivery with multiple transacted routes

2012-01-19 Thread kafe
Hum... actually this seems to be a normal behaviour : "Point of entry for redelivery attempts All redelivery attempts start at the point of the failure. So the route: .onException(ConnectException.class) .from("direct:start") .process("processor1") .process("processor2") // <--- throws a Conne

Re: camel-ftp scheduling and limit polling

2012-01-19 Thread roughrotter
i try to find how to limit polling but i can't find nothing about... -- View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-scheduling-and-limit-polling-tp5158013p5158303.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Redelivery with multiple transacted routes

2012-01-19 Thread kafe
The problem is that if i put an onException clause on the second route, when there is a redelivery (after an exception raised by 'processor2'), it directly starts at the point the exception was raised not at the beginning of routeA. -- View this message in context: http://camel.465427.n5.nabble.c

Re: Redelivery with multiple transacted routes

2012-01-19 Thread Babak Vahdat
Hi sharing the same transaction boundary doesn't necessarily mean sharing the same onException clause by two different routes. In this case defining the onException clause at the global scope should help. Check also [1] for the global & route specific scope definitions. [1] http://camel.apache.o

Re: Issue with loading TypeConverter in Camel 2.8.2 on JBOSS 7.2

2012-01-19 Thread lavanya
Hi Babak, Really appreciate your immediate response, due to licensing issues, we will have to switch to JBoss 5.0, in which case, the camel-jboss would suffice. I will give a try and update the forum. Thanks once again. -- View this message in context: http://camel.465427.n5.nabble.com/Issue-wi

Re: Camel under OSGi without Spring et al.

2012-01-19 Thread Guillaume Nodet
Start-level can't really be trusted, especially if you use blueprint for example, which does actually start the blueprint stuff asynchronously. On Thu, Jan 19, 2012 at 15:49, Donald Whytock wrote: > It may be a matter of personal taste, but I disagree with reliance on > start levels.  It should b

Redelivery with multiple transacted routes

2012-01-19 Thread kafe
Hi, I have some problem to have a correct redelivery policy in my environment. I work with transacted routes and i'd like to have 3 redelivery attempts if any exception is raised. I have the following routes : java.lang.Exception true <*

Converting message body after GroupedExchangeAggregationStrategy

2012-01-19 Thread suman
Hello All, This is my route from("direct:getstreaminfo").startupOrder(2) .recipientList().method(MessageRouter.class, "routeTo").parallelProcessing().aggregationStrategy(new GroupedExchangeAggregationStrategy()).convertBodyTo(String.class) .proc

Re: camel-ftp scheduling and limit polling

2012-01-19 Thread Babak Vahdat
Hi, maybe digging into the unit-tests, like in [1], could give you an idea how to do that. [1] https://svn.apache.org/repos/asf/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote Babak -- View this message in context: http://camel.465427.n5.nabble.com/camel-f

camel-ftp scheduling and limit polling

2012-01-19 Thread roughrotter
Hello everyone, i need to configure an ftp route that allow me to: schedule starting, then dowload all file present on ftp server, if no file present polling only for a limited times eg. every 5 seconds for an hour, than if no file downloaded stop polling, stop route and send an email of report.

Re: Keep the routes created dynamically after restarting

2012-01-19 Thread Claus Ibsen
Hi And yes you can also use a LifecycleStrategy to keep track of those events when routes is being added/removed. And then do your store to database / remove from data stuff. On Thu, Jan 19, 2012 at 3:59 PM, Nicolas Gapaillard wrote: > Hi, > > Thank you for your answer, > > I'm not sure it is r

Re: Testing: MockEndpoint has sometimes a Message and sometimes not

2012-01-19 Thread Claus Ibsen
I suggest to convert the result of http4 to a String before sending to the seda queue. For example if processing the messages happens much later, and the http connection has been closed, and the input stream is closed and returns no data. On Thu, Jan 19, 2012 at 11:38 AM, Andreas Feldmann wrote

Re: using values from a properties-file in setHeader-method

2012-01-19 Thread ebinsingh
I see something strange here. If I have the below to routes, the logginf works perfectly. ${file:path} ${file:name} ltel2

Re: Keep the routes created dynamically after restarting

2012-01-19 Thread Claus Ibsen
Hi Just marshal the routes to XML *before* you add new routes dynamic. On Thu, Jan 19, 2012 at 3:59 PM, Nicolas Gapaillard wrote: > Hi, > > Thank you for your answer, > > I'm not sure it is really adapted to my problem. > > Because I need to export automatically, not manually. I want that my ca

Re: Keep the routes created dynamically after restarting

2012-01-19 Thread Nicolas Gapaillard
Hi, Thank you for your answer, I'm not sure it is really adapted to my problem. Because I need to export automatically, not manually. I want that my camel server has always the last routes. For example, if my camel server crashes, I want to keep all the routes created before the crashe. Or mayb

Re: using values from a properties-file in setHeader-method

2012-01-19 Thread Claus Ibsen
Put the outside the . On Thu, Jan 19, 2012 at 3:56 PM, ebinsingh wrote: > Hi All, > > I am trying to set few header's, but does not seem to work. > I guess I am missing something but not able to find that out. > The below logs age not printted in the log file. > > >       >             headerNa

Re: using values from a properties-file in setHeader-method

2012-01-19 Thread ebinsingh
Hi All, I am trying to set few header's, but does not seem to work. I guess I am missing something but not able to find that out. The below logs age not printted in the log file. ${file:path} ${file:name} ltel2

Re: Camel under OSGi without Spring et al.

2012-01-19 Thread Donald Whytock
It may be a matter of personal taste, but I disagree with reliance on start levels. It should be more reliable to use a BundleListener to track whether a particular bundle has loaded, or a ServiceTracker with the bundle being watched for launching a "here I am" service when initialization is compl

Re: Camel under OSGi without Spring et al.

2012-01-19 Thread metatech
Hi, My previous conclusion was not correct. The Camel initialization happens indeed in the "addingBundle" method, but is called from a SynchronousBundleListener, in the same thread that activates the bundle, and there is only one thread ("FelixStartlevel") that activates all feature bundles, so it

Re: Sending a ArrayList takes so long ?

2012-01-19 Thread ricardofaccioli
Babak, Yes my broker have a active mq: from("activemq:analisarColeta1:analisarColeta").to("seda:analisarColeta?concurrentConsumers=" + execucoesSimultaneas); I finally fix the problem! The class ResourceProperties in client side, I forgot the implements Serializable. =[ When I done this the pr

Re: Sending a ArrayList takes so long ?

2012-01-19 Thread Babak Vahdat
Hi, somehow I still don't get it! Your routing logic does consume using the Seda endpoint however your client logic where you produce and send an exchange uses the ActiveMQ component [1]! So that I can't correlate these two code snippets to each other. Another question: the Executor you make use

Re: Asynchronous Netty Server And CAMEL

2012-01-19 Thread rbucker
Did you get a response to this? The example you propose is so commonplace when doing system integration without HTTP; just raw sockets... That I cannot imagine that it's going to be this hard to get a sample. -- View this message in context: http://camel.465427.n5.nabble.com/Asynchronous-Netty-Se

Re: Keep the routes created dynamically after restarting

2012-01-19 Thread Claus Ibsen
Hi Yeah can export the routes as XML, and then load them upon restart. A little example to load the routes http://camel.apache.org/loading-routes-from-xml-files.html Then to save them is also fairly easy. On Thu, Jan 19, 2012 at 1:55 PM, Nicolas Gapaillard wrote: > Hi all, > > Is is somethin

Re: Sending a ArrayList takes so long ?

2012-01-19 Thread ricardofaccioli
Hello: My Broker receive a message and generate a list of Objects: from("seda:analisarColeta?concurrentConsumers=" + execucoesSimultaneas).process(new Processor() { public void process(Exchange exchange) throws Exception { AnalisarColetaReq req = (AnalisarColetaReq) e

Re: Sending a ArrayList takes so long ?

2012-01-19 Thread Babak Vahdat
Hi, Could you be please more precise about the problem you're facing? Is the line: exchange.getOut().setBody(); part of your *own* implemented Producer logic? If not which Camel component do you make use of? And along the 2 lines: List response = new ArrayList(); response = (List) exchange.ge

Keep the routes created dynamically after restarting

2012-01-19 Thread Nicolas Gapaillard
Hi all, Is is something in camel that permits to persist the routes created dynamically in bdd or an xml file ? Because for now, I have an application that permits to instanciate new routes inside camel via the RoutesBuilder. It works very well. But if camel is restarted, I lose all my already de

Sending a ArrayList takes so long ?

2012-01-19 Thread ricardofaccioli
Hello, When I send one ArrayList with a size about 150 in : exchange.getOut().setBody(); My app(client) stuck and don`t receive the message: Producer producer = endpoint.createProducer(); producer.start(); producer.process(exchange); producer.stop(); Li

Re: Camel sftp endpoint and exception handling.

2012-01-19 Thread Raul
I have a similar problem. (.GenericFileOnCompletion) [ad #0 - ftp://localhost/origen] GenericFileOnCompletionERROR Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - File operation failed: Software caused connection abort: socket write error. Code: 250] In

Re: Howto use maxMessagesPerPoll and sortBy for file-consumer

2012-01-19 Thread Claus Ibsen
On Thu, Jan 19, 2012 at 12:07 PM, Hartmut Lang wrote: > Ok, > > maybe it's a good idea to add this to the documentation for file2, "Sorting > using sortBy" section. > Added a note to the maxMessagesPorPoll option, as its the one which causes this limitation. > Thanks, > Hartmut Lang > > -O

RE: Howto use maxMessagesPerPoll and sortBy for file-consumer

2012-01-19 Thread Hartmut Lang
Ok, maybe it's a good idea to add this to the documentation for file2, "Sorting using sortBy" section. Thanks, Hartmut Lang -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Donnerstag, 19. Januar 2012 12:02 To: users@camel.apache.org Subject: Re: Howto use ma

Re: Howto use maxMessagesPerPoll and sortBy for file-consumer

2012-01-19 Thread Claus Ibsen
On Thu, Jan 19, 2012 at 11:57 AM, Hartmut Lang wrote: > Hi, > > what i see from https://issues.apache.org/jira/browse/CAMEL-2899 is that > maxMessagesPerPoll and sortBy option do not work well together for a > FileConsumer endpoint. > > In our use-case we have several thousand files in a from("f

Howto use maxMessagesPerPoll and sortBy for file-consumer

2012-01-19 Thread Hartmut Lang
Hi, what i see from https://issues.apache.org/jira/browse/CAMEL-2899 is that maxMessagesPerPoll and sortBy option do not work well together for a FileConsumer endpoint. In our use-case we have several thousand files in a from("file:...") route. And every minute we want to process one file sort

Testing: MockEndpoint has sometimes a Message and sometimes not

2012-01-19 Thread Andreas Feldmann
Hallo everbody, currently I am using JUnit-tests for testing purposes. In my project I have a route with a software-proxy (Jetty) and then some webservices. That part is working very well. The software-proxy/webservices respond with the according messages, when I use SOAP-UI. Now I tried to cons

Re: Testing headers in multiple messages

2012-01-19 Thread developpef
FYI, I opened CAMEL-4919 - http://developpef.blogspot.com -- View this message in context: http://camel.465427.n5.nabble.com/Testing-headers-in-multiple-messages-tp5157167p5157294.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Testing headers in multiple messages

2012-01-19 Thread developpef
Thank you for this hint. I will open a JIRA for this. Yes I think that this point might be comparable to expectedBodiesReceivedInAnyOrder. I will try your solution, but I would prefer not to modify the "prodution ready" route, even if it's not an important change. - http://developpef.blogspot

spagic and Camel

2012-01-19 Thread jmh
Hello, simple quesiton : is it possible to use Spagic to monitor Camel components ? Regards J-M -- View this message in context: http://camel.465427.n5.nabble.com/spagic-and-Camel-tp5157280p5157280.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Testing headers in multiple messages

2012-01-19 Thread Claus Ibsen
Hi So you mock endpoint receives 3 messages in any order. And you just want to test that those 3 messages has all together those 3 different headers? We got that on the body, where you can say expectedBodiesReceivedInAnyOrder We may consider a similar for the headers. You can configure the fil

Re: Missing schema file in a cookbook article

2012-01-19 Thread Andreas Feldmann
Thanks a lot. My eclipse complained about the missing schema. I added your suggested jar by: org.apache.camel camel-cxf-transport ${camel-version} -- View this message in context: http://camel.465427.n5.nabble.com/Missing-schema-file-in-a-cookbook-article-tp5128466p5157243.html Sent from the

Re: Single request with multiple replies over TCP

2012-01-19 Thread jonv
If you cant wait for the new mina component you will have to write your own camel component to do this - at least that is what I ended up doing! Im new to camel so what I did cannot have the best implementation strategy, so I will probably replace with the mentioned mina2 component. However a brief

Testing headers in multiple messages

2012-01-19 Thread developpef
I recently saw the jira CAMEL-4159 but it is not what I expected : this issue is intended to let a test expect for multiple headers in ONE message. What I needed is the following : I know that a given endpoint will receive 3 messages in any order, and I need to test ONE header in each of these mess

Re: Camel 2.9.0 integration with CXF2.5.1 Help

2012-01-19 Thread Willem Jiang
Although CXF 2.5.1 is built with JDK 1.5, as the Camel 2.9 is moved to JDK 1.6. You'd better use JDK 1.6 to run your application. On Thu Jan 19 11:27:54 2012, Claus Ibsen wrote: Hi You got both some CXF 2.4 and 2.5 files on the classpath. And it seems like a JDK 5 and 6 issues as well. Make su