call async bean problem

2018-03-16 Thread Marco Westermann
Hi camel riders, I have a problem with a route which needs to call a bean but the bean itself is async (rxjava2) My route is created in a vertx verticle using eventbus bridge. my route looks like: from("direct:process")     .bean("myProcessor", "process")    

Website not rendered correctly

2017-09-28 Thread Marco Westermann
I see this on chrome and firefox. eg: http://camel.apache.org/exception-clause.html http://camel.apache.org/dead-letter-channel.html http://camel.apache.org/error-handler.html Best regards, Marco Westermann

Re: Suspend All routes & Resume incase of Business Exception

2016-08-01 Thread Marco Westermann
Hi, you may have a look here http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html where is described how you can start / stop routes from routes. regards Marco Am 01.08.2016 um 11:42 schrieb fxthomas: hello, I wish to know which would be the best approach to Suspend and

Re: Bundle is waiting for namespace handlers blueprint

2016-01-14 Thread Marco Westermann
Hi, can you confirm that the broker bundle stays in grace period? Then that is an old issue. It has something to do with the order the bundles get startet. And that has to do with the server performance.. I had servers where I faced that issue at every start. On some servers I have that

Testing camel route via pax exam

2015-08-26 Thread Marco Westermann
Hi, I try to test a camel route via pax exam. In general I followed the tutorial by jb (http://blog.nanthrax.net/2014/08/testing-utest-and-itest-apache-camel-blueprint-route/) The route I'd like to test sends a message to an activemq queue. Therefor I'd like to grab that message in my test

Re: Starting a rout once on start and then always at 3am

2014-11-28 Thread Marco Westermann
Hi, you can use a second route with a timer and set the timer property repeatCount to 1, so the timer will only fire once when the route is started. Have a look here: http://camel.apache.org/timer.html regards Marco Am 28.11.2014 13:54, schrieb dermoritz: I have a route using jdbc

Re: Starting a rout once on start and then always at 3am

2014-11-28 Thread Marco Westermann
you can split your original route into three ones like that: from(direct:process) .to(jdbc) .whatever; from(timer:myTimer? repeatCount=1) .to(direct:process); from(quarz:cron) .to(direct:process); that way the direct:process route gets triggerd by the timer and the quarz

log exceptions in DeadLetterChannel error handler

2014-11-14 Thread Marco Westermann
Hi all, if I have a route like this: from(timer..) .bean(MyBean.class, test) If I deploy that to servicemix and there is an exception in the MyBean class, I get an exception stack trace in servicemix.log. But if I add a global error handler like this:

Re: Accessing an osgi service interface from another bundle

2014-03-13 Thread Marco Westermann
Hi Mahesh, bundle 1 looks good so far. in your second bundle do the following: ad an instance variable to your bean which is of type of the interface like: class mypgm { private com.outotec.uom.mapping.MappingInterface mappingService = null; // here getter + setter for mappingService } then

Re: Getting SSH_MSG_CHANNEL_FAILURE while using camel ssh

2013-11-29 Thread Marco Westermann
Hi, it looks like the message body is null when you call the ssh endpoint. Do you set a command to the message body before calling the endpoint like: .from(direct:a) .setBody().constant(ls -la) .to(ssh:); regards Marco Am 28.11.2013 19:55, schrieb mayank.gupta: Dear All , I doing ssh

Re: JAXB partial unmarshalling

2013-09-16 Thread Marco Westermann
Hi, in addition to what you do I alway set the fragement property to true. Try the follwing: jaxb.setFragment(true) regards, Marco Am 16.09.2013 06:40, schrieb hutao722: Hi, I tried to do JAXB partial unmarshalling test, but always get null values from xml to java object. The code like

Re: JAXB partial unmarshalling

2013-09-16 Thread Marco Westermann
In addition to my last anwer: Are you sure your namespaces are correct? your xml is in the namespace: Yangzhili regards, Marco Am 16.09.2013 11:50, schrieb Marco Westermann: Hi, in addition to what you do I alway set the fragement property to true. Try the follwing: jaxb.setFragment(true

Re: Change timer runtime

2013-09-02 Thread Marco Westermann
Hi, I think you have more opinions to reach your goal. One easy solution would be to use the quarz component instead of the timer. You can configure the quarz component by a cron config. Therefor you could configure that it should run as many times as you need to process all rows.

Re: How to establish Telnet session in Camel 2.9

2013-08-30 Thread Marco Westermann
Hi, you can use camel-mina for that. http://camel.apache.org/mina2.html Am 30.08.2013 13:06, schrieb rnitin: Hi, Can any one guide me how to create telnet session in camel 2.9 -- View this message in context:

Re: bundle stays in state creating

2013-08-30 Thread Marco Westermann
://camel.apache.org/jms Then that happens in another thread, and the bundle will be able to startup. On Fri, Aug 30, 2013 at 2:55 PM, Marco Westermann marwesterm...@gmx.de wrote: Hi, I just found an imperfection in camel 10.6 + smx452 + blueprint. I have some camel bundles each containing

Re: ExchangePatterns ?

2013-08-15 Thread Marco Westermann
Hi, for an explanation about exchange pattern have a look here: http://camel.apache.org/request-reply.html first of all I would set the exchange pattern as an argument on the to-element cause I think that makes the routes much more readable. Nevertheless I cannot find an error at your

Re: Why can not get the data

2013-08-14 Thread Marco Westermann
Hi, what exactly is you problem. Do you get an exception? try it with the following in your route: .to(file:/d:/temp/outbox?fileName=data.txt) recognize the / before d: regards, Marco Am 14.08.2013 12:00, schrieb yiwang: hello everyboby,I ask a question. I write the code: public class

error handling async instead of sync

2013-07-23 Thread Marco Westermann
Hi, I have a route with an errorHandler configured. I set it to redeliver async. But when an error occures the remaining messages on the queue are processed after the redelivery of the failed message ends. Here is my routebuilder: http://pastebin.com/8fUED75R Is there something wrong with

Re: Aggregator and splitter

2013-04-22 Thread Marco Westermann
Hi, I'm not sure what you are asking about. You may provide some route code you already have. The first route you will need is the polling of the file and decission what kind of file has been found (pdf, txt, xml) Handle that files in different routes and bring them to the same format.

Re: Camel routing DSL - Questions

2013-04-15 Thread Marco Westermann
I guess you would get more help if you are more patient and not sent three mails in 10 minutes asking the same. Marco Am 15.04.2013 16:43, schrieb prabumc...@gmail.com: Question:1 I am having code like blow.based on condition i want forward into dynamic queue.

Re: Why doesn't this ErrorHandler work?

2013-03-27 Thread Marco Westermann
Hi, maybe the predicat body().isNull() is never true. Then nothing would happen.. you can try this also with a content based route .choice .when(body().isNull()) .log(body is nulll) .otherwise() .log(body is ${body}) remember that for example an empty string is not

Re: Cannot write null body to file error !

2013-03-25 Thread Marco Westermann
Hi, first you need a basic understanding of the route parts (endpoints) you are using. If I understand you correct you have files in your source directory which you want to move to a destination directory at a given time?! Then you have three alternatives how to archive this. 1. poll a

Re: Write enriched data after a split in a file

2013-03-08 Thread Marco Westermann
Hi, maybe you can process this by using a bean. Then you can open the stream at the beginning and close it at the end. I try to show you what I mean: FileWriterBean fwBean = new FileWriterBean(); public void configure() { from(file://) .bean(fwBean, openFileForProcessing)

Starting a camel project

2013-01-14 Thread Marco Westermann
Hi, what is the correct way to run a camel project which was generated by the camel-java archtype in productive. In general I always deploy camel bundles to smx. But this time I want a standalone application without smx. Using java -jar xxx.jar I get an error that there is no main-class

Re: unmarshal JSON to Map/List of Strings

2012-10-26 Thread Marco Westermann
Hi, there is a json data type you can use for un/marshalling. have a look here: http://camel.apache.org/json.html regards, Marco Am 26.10.2012 11:51, schrieb clakech: Hi, I would like to unmarshal a Json to a Map/List of Strings (eg MapString, Maplt;String, Maps...) Here is my input:

bug in startup order?

2012-10-15 Thread Marco Westermann
Hi, is there a bug with the startupOrder feature? I have the following route: from (activemq:a) .to(direct:b); from(direct:b) .bean(DoSomething); When I start my bundle with this route and the queue a already has some messages on it I get a warning that no consumers are available for

Re: Starting route(s) upon completion of another route

2012-09-23 Thread Marco Westermann
Hi, you can start and stop routes from other routes. So if A has finished processing it can start the other routes. have a look here: https://camel.apache.org/how-can-i-stop-a-route-from-a-route.html best regards, Marco Am 21.09.2012 18:30, schrieb Edwin: Thanks for your reply Willem,

make aggregation time configurable

2012-08-24 Thread Marco Westermann
Hi, I have a java route which uses the aggregate. I would like to make the completionTimeout configurable via properties. What I already tried is to set the timeout with the simple language, but then I get an error, that the value is not allowed. How could I manage to make the timeout

Re: camelwatch login

2012-08-21 Thread Marco Westermann
, Marco Westermann marwesterm...@gmx.de wrote: ohh.. Ok thank you for your help! regards, Marco Am 16.08.2012 13:47, schrieb michal.warecki: Looking at the code, I think it is hardcoded to user/pass, therefore you can't change it. -- View this message in context: http://camel.465427.n5.nabble.com

camelwatch login

2012-08-16 Thread Marco Westermann
Hi, I'm not sure if this is the correct address for my question. I'm wondering how I would configure the jmx user and password for camelwatch. I try to monitor a camel instance inside smx. All I can configure in camelwatch is the jmx-url but how do I provide the login data for that url?

Re: camelwatch login

2012-08-16 Thread Marco Westermann
ohh.. Ok thank you for your help! regards, Marco Am 16.08.2012 13:47, schrieb michal.warecki: Looking at the code, I think it is hardcoded to user/pass, therefore you can't change it. -- View this message in context: http://camel.465427.n5.nabble.com/camelwatch-login-tp5717510p5717512.html

Re: IdempotentRepository

2012-07-06 Thread Marco Westermann
Hi, I had a very similar problem. I wrote a little bean which writes the last number processed to a file. Another method gives me the last number processed. regards, Marco Am 06.07.2012 11:53, schrieb Christian Lipp: Do you mean eagerMaxMessagesPerPoll ? I set it to false, but nothing

Re: xslt error with document('')

2012-05-29 Thread Marco Westermann
Hi Yogesh, thank you for your suggestion. I will try that. regards, Marco Am 25.05.2012 20:42, schrieb ychawla: Hi Marco, Are you using the same XSLT processors in eclipse and in Camel? I like using Saxon and you can customize your XSLT processor like this: bean id=sFactory

xslt error with document('')

2012-05-25 Thread Marco Westermann
Hi, I have a route which uses an xslt transformation. When I run the transformation within eclipse everything works fine. But when I use that transformation within my camel route, I get a TransformationException with message: included href is empty. within the xslt I have a xsl:for-each

Re: Separate XML tags with splitter

2012-05-10 Thread Marco Westermann
Hi, using the split tag creates multiple messages depending on how much elements there are, and these messages are processed one by one. from(file:orders.xml).split().xpath(/orders/order) ... that means the endpoint after the split is called multiple times (with every message) Now you can

Re: Dynamic source endpoint

2012-05-04 Thread Marco Westermann
Hi, use can use pollEnrich to consume a file within a route. from(sql...) pollEnrich(file://) .to(activemq:myqueue); look here: http://camel.apache.org/content-enricher.html Another way could be to call a bean which reads the file and return the content of the file from(sql)

Re: xpath and namespaces

2012-04-27 Thread Marco Westermann
Hi, I'm not sure if this is suitable for you in your use case, but in this cases where namespaces doesn't work I don't refer to namespaces in my xpath like: .split().xpath(/*[local-name() = 'dxf']/*[local-name() = 'organisationUnits']/*[local-name() = 'organisationUnit']) regards, Marco

Re: Read a file from network location

2012-04-26 Thread Marco Westermann
the file URI is file:// so the URL would look like file://\\10.200.208.223/share/input regards, marco Am 26.04.2012 12:28, schrieb Gnanaguru S: Ya. Its not working. from uri=file:10.200.208.223\\share\\input/ This is how i specified. Regards Guru -- View this message in context:

Re: Merge XML files

2012-04-25 Thread Marco Westermann
HI, if I understand you correct, you miss the IPDRDoc-Element in the output after you splitted the message by tokenizeXML(IPDR), is that correct? if you split a message by an xml-Element you will loose the parent-elements of that element you split by. What you can do is to aggregate the

Re: How to get header parameter in a to route of camel

2012-03-22 Thread Marco Westermann
Hi, you cannot use simple language in the to endpoint-uri, but you can use it in the recipientList! from( jms:request) .process(new AddHeader()) .recipientList(simple(cxfrs://http://abc.com/${header.test};)); regards, Marco Am 22.03.2012 16:13, schrieb atg roxx: Hi

Re: Throttling: maximumRequestsPerPeriod problem

2012-03-22 Thread Marco Westermann
Hi, did you see, that the syntax changed with camel 2.8: see: http://camel.apache.org/throttler.html throttle timePeriodMillis=1 constant3/constant to uri=mock:result/ /throttle regards, Marco Am 22.03.2012 16:37, schrieb garrydias: Hi! I´m trying to use Throttle

Re: Choice() When() always generate empty predicate

2012-03-16 Thread Marco Westermann
Hi, you may try building the predicat by simple language: .when(simple(${property.input.format} == 'test')) compare to http://camel.apache.org/simple.html regards, marco Am 16.03.2012 15:53, schrieb Thibault: Hi all, I have this DSL route definition: from(seda:InTransform) .choice()

Re: Access the entire CXF Payload with XSLT

2012-03-16 Thread Marco Westermann
Hi, I'm not completely sure but I think using PAYLOAD means that you always geht the soap-body as this is the payload of the message. If you want the complete soap-message you can use MESSAGE instead of PAYLOAD. regards, Marco Am 16.03.2012 16:29, schrieb Kerry Barnes: Using camel 2.8.3

Re: reading http endpoint from properties files

2012-01-26 Thread Marco Westermann
Hi what you need is the properties component. Look here: http://camel.apache.org/properties.html then you can refer your endpoint like this .to({{myHttpEndpoint}}) where you have that defined in your properties like this: myHttpEndpoint=http://servername.com/test regards, Marco Am

http never times out

2011-10-04 Thread Marco Westermann
Hi, I think I found a bug in camel 2.8 I have the following code: public void configure() { from (activemq:newOrders) to(http://server:port/path/?bridgeEndpoint=truehttpClient.soTimeout=12;) } this code terminates after 2 mins with a timeoutException (which is OK) now I

Re: http never times out

2011-10-04 Thread Marco Westermann
Hi Claus, thank you for your response. But wouldn't it show the log Doing redelivery of message after 2 mins? regards, Marco Am 04.10.2011 12:52, schrieb Claus Ibsen: On Tue, Oct 4, 2011 at 11:22 AM, Marco Westermannmarwesterm...@gmx.de wrote: Hi, I think I found a bug in camel 2.8 I

Re: Messages being lost from route

2011-09-28 Thread Marco Westermann
Hi, I suggest enable tracing to see exactly what happens in your route. regards, Marco Am 28.09.2011 13:01, schrieb Alistair Young: I now have a dead letter channel which is empty after losing 9 out of 10 messages. I also added a logging handler which logged nothing. Verified the messages

Re: Loading multiple files from the same directory

2011-07-14 Thread Marco Westermann
Hi, couldn't you process the files by using a content based router at the filepolling endpoint? Sth like from(file:directory) .choice() .when(header(filename).isEqualTo(a.txt)) .to(direct:a) .when(header(filename).isEqualTo(b.txt)) .to(direct:b)

Re: What codec do we need to use for sending an XML message to a MINA endpoint.

2011-07-07 Thread Marco Westermann
you may use the jetty http-component instead of mina eg. from(jetty:http://0.0.0.0/transformxml;).transform().setBody(answer/); Am 07.07.2011 11:29, schrieb Sushmita chandra: I am trying to send an XML message to a MINA endpoint and read it back from there and do some processing.But I am not

error handler

2011-07-06 Thread Marco Westermann
Hi, just a little understanding question. If I have a route from(file:///data/input/) .to(direct:transform) .to(direct:enrich) .to(direct:transform) .to(file:///data/output) what message would deadLetterChannel(direct:failedFiles).useOriginalMessage() handle, when an error

Re: error handler

2011-07-06 Thread Marco Westermann
Hi Filippo, thank you for your answer, but what is the orgininal input message when direct-routes come into play? If an error happens in one of the direct routes, is the original message then the one which comes as input into the direct-route or the one from the file-endpoint? And what is the

Re: File Reading Writing using Camel

2011-07-01 Thread Marco Westermann
Hi, if you build your project using //mvn archetype:create -DarchetypeArtifactId=servicemix-camel-osgi-bundle -//DarchetypeGroupId=org.apache.servicemix.tooling //-DartifactId=your.artifact -//DgroupId=yourGroup// you get an example how to read a file and process it. to change it to write

Re: intercept route

2011-06-27 Thread Marco Westermann
in such a thing. best regards, Marco Am 24.06.2011 17:10, schrieb Marco Westermann: Hi, is it somehow possible to intercept a route from outside the camel context? I'd like to write a module which intercept every route which is deployed in SMX and does something with the intercepted messages. Thank you

Re: intercept route

2011-06-26 Thread Marco Westermann
to camel if you are interested in such a thing. best regards, Marco Am 24.06.2011 17:10, schrieb Marco Westermann: Hi, is it somehow possible to intercept a route from outside the camel context? I'd like to write a module which intercept every route which is deployed in SMX and does something

Re: intercept route

2011-06-25 Thread Marco Westermann
. Actually, I'm investigating the exact same thing to include in ServiceMix.  If you're interested, monitor the servicemix dev list as I plan to start a thread about that next week. On Fri, Jun 24, 2011 at 17:10, Marco Westermann marwesterm...@gmx.de wrote: Hi, is it somehow

Re: camel-cache configuration

2011-06-24 Thread Marco Westermann
Hi, thank you for your answers. But what did that mean for me and my problem. Is there a solution. Do I have to apply the patch attached to jira? or is there already a fixed version? I'm not that familiar with camel development. ;-) Thank you Marco Am 22.06.2011 17:48, schrieb Marco

intercept route

2011-06-24 Thread Marco Westermann
Hi, is it somehow possible to intercept a route from outside the camel context? I'd like to write a module which intercept every route which is deployed in SMX and does something with the intercepted messages. Thank you in advance. Marco

Re: intercept route

2011-06-24 Thread Marco Westermann
thing to include in ServiceMix. If you're interested, monitor the servicemix dev list as I plan to start a thread about that next week. On Fri, Jun 24, 2011 at 17:10, Marco Westermann marwesterm...@gmx.de wrote: Hi, is it somehow possible to intercept a route from outside the camel

camel-cache configuration

2011-06-22 Thread Marco Westermann
Hi, how do I configure the camel-cache (ehcache) component, if I don't need a from(cache) in my route? I don't wan't to react on changes in the cache. in docs http://camel.apache.org/cache.html the example does the configuration within the from-element. If I try to add values to the cache