Re: Camel marker files ".camelLock" not deleted

2017-03-13 Thread Stephan Burkard
ch is covered in the 2nd ed > of the Camel book in the transactional chapter. And as well in the > upcoming chapter on clustering. > > > > On Mon, Mar 13, 2017 at 3:47 PM, Stephan Burkard > wrote: > > Hi Camel riders > > > > I have a quite simple poll

Camel marker files ".camelLock" not deleted

2017-03-13 Thread Stephan Burkard
Hi Camel riders I have a quite simple polling file consumer that runs fine on 2 instances. from(fileEndpointUri) .routeId(routeId) .log("[FILEREADER " + routeId + "], file: ${in.header.CamelFileName}") .setBody(method(bomProcessor, "removeBomIfPresent")) .to(jmsEndpointUri); The fileUri options

Re: Best way to build a wait/retry loop with Camel?

2016-11-08 Thread Stephan Burkard
eve ActiveMQ was really intended to hold many messages for > > long term storage, hence we use something that was. > > > > > > On 3 November 2016 at 15:46, Stephan Burkard wrote: > > > >> Hi Camel users > >> > >> TLDR: > >> - how to i

Re: Best way to build a wait/retry loop with Camel?

2016-11-04 Thread Stephan Burkard
Hi all Thanks a lot for the interesting answers. @Quinn: The AMQ scheduler delay is a great way to accomplish this since it makes even the waiting queue completely obsolete. And if one cannot change the configuration to activate the AMQ scheduler, the route stop via ControlBus is also a good alte

Best way to build a wait/retry loop with Camel?

2016-11-03 Thread Stephan Burkard
Hi Camel users TLDR: - how to implement wait/retry loop? - messages "wait" in a queue - each message should be reprocessed only once per interval (let's say per day) - after reprocessing a message either returns to the waiting queue or continues (goes out of loop) - after [maxRetry] attempts it is

Camel Online-Docs

2016-10-25 Thread Stephan Burkard
Hi On the page https://camel.apache.org/mail.html is probably a version note missing. The carbon copy parameter is mentioned as "cc" (lowercase). With Camel 2.12 this does not work, the parameter is not recognized. Instead I had to use "CC" (uppercase). I have not tried it, but perhaps this is th

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-08 Thread Stephan Burkard
Hmmm... not really sure about #2... or do I also need a JTA Tx manager for working with multiple brokers? On Tue, Feb 9, 2016 at 8:48 AM, Stephan Burkard wrote: > Hi Quinn > > I found this blog post that explains some things we found out: > > http://tmielke.blogspot.ch/2012/03

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-08 Thread Stephan Burkard
s a ActiveMQ JUnit rule in 5.13.1 that would make this testing > easier (shameless plug - I contributed the rule ;-) ). It should pickup > the ActiveMQ broker jars from the test class path, so it should work with > versions of the broker other than 5.13.1. > > > On Feb 8, 2016, a

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-08 Thread Stephan Burkard
nsacted = true even when they define Tx manager etc. Regards Stephan On Mon, Feb 8, 2016 at 4:59 PM, Stephan Burkard wrote: > Hi Quinn > > Here is the new version of my test project that uses an embedded ActiveMQ > broker. Since the AMQ libs are of version 5.9.0 (standard edition) there

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-06 Thread Stephan Burkard
;>> > >>>>2.12.5 > >>>>5.9.0 > >>>> > >>>> > >>>> > >>>> > >>>>org.apache.activemq > >>>>activemq-all > >>>>${activemq-version} > >>>> >

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-04 Thread Stephan Burkard
${camel-version} > >> > >> > >> > >> org.apache.camel > >> camel-test-spring > >> ${camel-version} > >> test > >> > >> > >> > >> com

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-04 Thread Stephan Burkard
you still have transacted set to true in the > JmsConfiguration. > > I’m not sure what’s going in with the “standard” version - it looks > similar to some XA stuff I’ve setup before (because I had multiple brokers > involved) except I had to use XA Connection Factories. > > >

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-03 Thread Stephan Burkard
Yes, same broker. There is only one ActiveMQ connection config in the project. On Wed, Feb 3, 2016 at 8:00 PM, Quinn Stevenson wrote: > Are both the source and destination queues hosted by the same ActiveMQ > broker? > > > > > On Feb 3, 2016, at 8:21 AM, Stephan Burka

Re: Transacted routes despite missing "transacted" flag (ActiveMQ component)

2015-09-26 Thread Stephan Burkard
e TX, > you need all that glory TX setup. And also if you want to use other > resources such as JDBC. > > > > On Fri, Sep 25, 2015 at 5:47 PM, Stephan Burkard > wrote: > > Hi > > > > Since my question below was never answered, I have attached a small > examp

Re: Camel activemq consumer

2015-07-01 Thread Stephan Burkard
Hi Check out Polling Consumer: http://camel.apache.org/polling-consumer.html Regards Stephan On Mon, Jun 29, 2015 at 5:40 AM, rbkumar88 wrote: > Hi, > > Is there anyway to have a camel activemq consumer to consume only one > message at a time. > PFB the scenario. > > I have a quartz schedule

Re: org.apache.camel.FailedToCreateRouteException: Failed to create route with SNMP component

2015-06-23 Thread Stephan Burkard
The exception says that your "oids" parameter cannot be converted from String to OIDList because there is no converter available. Make sure you have the camel-snmp component in your class path. I guess the needed converter is in this component. org.apache.camel camel-snmp x.x.x

Re: Multiple CamelContext in separate bundles

2015-06-23 Thread Stephan Burkard
Hi The message "osgi.wiring.package=org.apache.camel.spring.interceptor" means that your bundle imports the package org.apache.camel.spring.interceptor but no bundle exports that package. Therefore the import cannot be resolved. Regards Stephan On Tue, Jun 16, 2015 at 2:02 PM, jamalissimo wro

Transacted routes despite missing "transacted" flag (ActiveMQ component)

2015-02-23 Thread Stephan Burkard
Hi So far I always configured the Camel ActiveMQ component with a Spring JmsTransactionManager etc and marked my routes explicit as "transacted" since we must not lose any messages. This kind of configuration can be found at various places, for example the Camel docs at http://camel.apache.org/tra

Re: Camel-Hazelcast: Adding values into a Map

2014-03-18 Thread Stephan Burkard
On the page you mentioned is an example request that is done with a producer template: template.sendBodyAndHeader("direct:[put|get|update|delete|query]", "my-foo", HazelcastConstants.OBJECT_ID, "4711"); my-foo => message body HazelcastConstants.OBJECT_ID => message header name 4711 => message hea

Re: update HTTP request using previous response

2014-03-17 Thread Stephan Burkard
You could perhaps use the Loop EIP: https://camel.apache.org/loop.html It uses the result of the previous loop iteration for the next. You have to define the criteria to stop the loop (for example as header variable). Hope this helps Stephan On Mon, Mar 17, 2014 at 3:13 AM, aidatechinc wrote

Re: Camel-Hazelcast: How to setup multiple nodes?

2014-03-17 Thread Stephan Burkard
at 3:16 PM, doug5791 wrote: > Thank you for that information it was very helpful and makes sense. > > Out of curiosity, how would I go about connecting with a standalone grid? > > > "Stephan Burkard [via Camel]" > wrote: > > Hi > > You can deploy mu

Re: Camel-Hazelcast: How to setup multiple nodes?

2014-03-17 Thread Stephan Burkard
Hi You can deploy multiple instances of your application/bundle/whatever containing the Camel route. For example if you have an OSGi bundle that contains the route above, just install the bundle on multiple OSGi containers. Each bundle will set up the route and each bundle will start a hazelcast

Re: Camel Routes - Multi threading nor running parallel

2014-03-11 Thread Stephan Burkard
You have to use concurrentConsumer settings on the JMS or ActiveMQ component as Claus suggested: http://camel.apache.org/jms The JMS component has per default just 1 consumer and therefore the messages are consumed synchronous no matter what you do after the from(ACTIVEMQ_QUEUE) statement in your

Re: Suspend route after aggregator is complete

2014-03-10 Thread Stephan Burkard
You use a scheduler to give an interval to consume files. Why not using the file component to consume the files (see https://camel.apache.org/file2.html)? It has since Camel 2.12 a "scheduler" property for cron jobs and even in older versions you can use "delay" to schedule directory polling. Wit

Re: diagnosing onException problem?

2014-03-10 Thread Stephan Burkard
Yes, the Java-DSL-example on page 132 is missing it, but on the same page the book says "You also have to enable exponential backoff explicitly by setting the useExponentialBackOff option to true." ;-) Stephan On Mon, Mar 10, 2014 at 3:11 PM, Keith Freeman <8fo...@gmail.com> wrote: > Thanks fo

Re: Exception propagation with onException + pipeline

2014-03-10 Thread Stephan Burkard
Yes, if you define your onException globally. Currently you have defined it locally just for the pipeline. See section "Scopes" at http://camel.apache.org/error-handler.html Stephan On Thu, Mar 6, 2014 at 12:30 PM, Jose wrote: > Hi, > > I facing a problem catching exceptions when I use pipeli

Re: Camel process the same file again when idempotent = true

2014-03-07 Thread Stephan Burkard
Since Camel 2.11 this is at least possible for the file component with the option "idempotentKey". I am not sure if this also works for SFTP but you can give it a try. Here is an example from a unit-test: "...?idempotent=true&idempotentKey=${file:onlyname}-${file:size}" For the available key opti

SQL consumer, transactions and concurrency

2014-03-07 Thread Stephan Burkard
Hi Camel riders I'd like to consume records from a database and pass them to a queue. Sounds very simple as well as the route would be very simple: from("sql:select ...?consumer.onConsume=update or delete ...&otherOptions...").to("activemq:queue:myQueue"); respectively: from("sql:select ...

Re: LevelDB and Route-Tests

2014-01-22 Thread Stephan Burkard
the term "pertest" is very confusing) Therefore I guess the developers of the component had the same problems. But that means that in Eclipse only 1 Test can run in the same test-run, because the JUnit-Testrunner of Eclipse has no configuration to fork the tests. Stephan On Tue, Jan 21,

Re: Bug in LevelDB aggregator? NPE when completionSize 1

2014-01-22 Thread Stephan Burkard
a bug fix is appreciated. > > On Tue, Jan 21, 2014 at 4:25 PM, Stephan Burkard > wrote: > > Hi > > > > By accident I noticed that when I configure a LevelDB aggregator > > persistence with completionSize = 1 (yes I know, this is kind of an > > aggregator that

Bug in LevelDB aggregator? NPE when completionSize 1

2014-01-21 Thread Stephan Burkard
Hi By accident I noticed that when I configure a LevelDB aggregator persistence with completionSize = 1 (yes I know, this is kind of an aggregator that does not aggregate), I get the stacktrace below on every message. As soon as I set a completionSize > 1, everything runs fine. I guess this is a

LevelDB and Route-Tests

2014-01-21 Thread Stephan Burkard
Hi Camel users I ran into another problem with the LevelDB aggregator persistence. The error I get is "Error opening LevelDB with file [path to persistentFileName]". The cause of it is "LOCK: already held by process". This happens when I run multiple route tests using CamelSpringTestSupport. The

LevelDB Repository and "sync" flag

2014-01-21 Thread Stephan Burkard
Hi Camel users I am testing LevelDB as repository for the aggregator component. After reading the docs about the "sync" flag, I am unsure if I need to set it or not. Let's say my Java process with the Camel aggregator dies (not gracefully). What happens to the aggregation? A current aggregation i

Re: How to read aggregation from HawtDB when Camel cannot read it by index

2014-01-03 Thread Stephan Burkard
n or commited to the hawtdb component of > > Camel I can ask? > > > > Thanks > > Stephan > > > > > > > > On Fri, Dec 20, 2013 at 10:51 AM, Stephan Burkard >wrote: > > > >> Hi Camel users > >> > >> I am trying to recover data f

Re: Question about using message headers/Exchange properties and route testing

2014-01-03 Thread Stephan Burkard
Thank you very much Claus, great hints! I found the ExchangeBuilder in Camel 2.11 and later, so it is not available in my version, but I have to keep that in mind. However, I found a CamelTestSupport.createExchangeWithBody() method that seems to create an Exchange from my body object. Then I coul

Re: How to read aggregation from HawtDB when Camel cannot read it by index

2014-01-03 Thread Stephan Burkard
I know it is somehow the wrong place, but the HawtDB Google group seems to be dead (at least my posted question never appeared). Is there anybody who has written or commited to the hawtdb component of Camel I can ask? Thanks Stephan On Fri, Dec 20, 2013 at 10:51 AM, Stephan Burkard wrote

Re: Question about using message headers/Exchange properties and route testing

2014-01-03 Thread Stephan Burkard
Hi Henryk > Are you sure? :) Exchange properties are propagated as well as > headers. Can you show me an example, where the properties are not > propagated down the route? Wow, I just realized that there are producer methods to send a body and a property. I never noticed them before because I alw

Re: Question about using message headers/Exchange properties and route testing

2013-12-30 Thread Stephan Burkard
English) > http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese) > Twitter: willemjiang > Weibo: 姜宁willem > > > > On December 30, 2013 at 4:36:53 PM, Stephan Burkard (sburk...@gmail.com) > wrote: > > > > Hi Camel users > > > > To process arbitrary logic in

Question about using message headers/Exchange properties and route testing

2013-12-30 Thread Stephan Burkard
Hi Camel users To process arbitrary logic in my Camel routes, I use simple bean calls. That is fine because I can test all these pieces of logic with standard unit tests. However, often the bean calls produce results that are saved in the message header (if I need to save it for later) or Exchang

How to read aggregation from HawtDB when Camel cannot read it by index

2013-12-20 Thread Stephan Burkard
Hi Camel users I am trying to recover data from a Camel aggregator persistent hawtdb repository (Camel 2.9.x). The aggregator was killed unexpectedly because of an out-of-memory-error. I wrote a small Java class that opens the hawtdb file, creates a HawtDBAggregationRepository instance that uses

Re: JSR-233 and Camel-Script in OSGi environment (servicemix)

2013-12-17 Thread Stephan Burkard
feature in Karaf terms). > > > On Sat, Dec 14, 2013 at 4:05 PM, Stephan Burkard > wrote: > > > Hi Richard > > > > Yes I am referring to the Simple language. I was surprised that it tries > to > > load JavaScript, and if I had explicitly used a JavaScript expre

Re: JSR-233 and Camel-Script in OSGi environment (servicemix)

2013-12-14 Thread Stephan Burkard
t for SMX 4.6 > > which uses latest releases of all sorts. Usually OSGi is tricky and we > > fix once in a while some gremlins to get stuff working in OSGi. And > > Camel 2.9 is just too old. > > > > > > > > On Fri, Dec 13, 2013 at 9:44 AM, Stephan Bur

JSR-233 and Camel-Script in OSGi environment (servicemix)

2013-12-13 Thread Stephan Burkard
Hi Camel users Unfortunately I had to embed Camel 2.9 in an OSGi bundle since our platform version is currently 2.8 and that version suffers from a bug with errorhandling. However, when the route of that bundle gets the first message, camel-script tries to create a script engine for javascript (a

Re: Inject an endpoint into my route for testing purposes

2013-12-11 Thread Stephan Burkard
Hi You can use the advice-functionality => http://camel.apache.org/advicewith.html Since Camel 2.9 you can (in the test) completely replace your From-Endpoint with "replaceFromWith". Regards Stephan On Wed, Dec 11, 2013 at 12:30 PM, richie.rivi...@gmail.com < richie.rivi...@gmail.com> wrote:

Re: Can "useAdviceWith" raise problems with errorhandling?

2013-12-11 Thread Stephan Burkard
fore doing the route manipulations, the test runs fine. So it seems to be a timing thing... Regards Stephan On Tue, Dec 10, 2013 at 4:15 PM, Stephan Burkard wrote: > Hi Camel users > > My Camel is currently a bit wrong-headed and so I am riding down another > path than the one I a

Re: error handling design pattern advice

2013-12-10 Thread Stephan Burkard
Well, if I don't misunderstand the situation, you could just use try/catch inside "createSimpleProduct" method to skip the bad items. Regards Stephan On Thu, Dec 5, 2013 at 12:33 PM, richie.rivi...@gmail.com < richie.rivi...@gmail.com> wrote: > Hi All, > > I've got a question about error handli

Re: Camel route exchange intermediate call

2013-12-10 Thread Stephan Burkard
Hi You could simply save the original body into a Camel exchange-property before it is modified. Later you can get the original body from the property and set it into the body. But this works only if your exchange does not get lost during processing (for example if you have a queue inbetween). Ps

Can "useAdviceWith" raise problems with errorhandling?

2013-12-10 Thread Stephan Burkard
Hi Camel users My Camel is currently a bit wrong-headed and so I am riding down another path than the one I am expecting. I have attached a small example project that is based on Camel 2.9.8 and the problem occurs with errorhandling and adviceWith. I have a route with a default errorhandler with

Re: Return of issue CAMEL-4107 (SendProcessor has not been started)

2013-11-28 Thread Stephan Burkard
, Nov 28, 2013 at 8:57 AM, Stephan Burkard wrote: > Hi Claus > > I tried with 2.8.6 but I get the same error. > > Regards > Stephan > > > > On Thu, Nov 28, 2013 at 7:58 AM, Claus Ibsen wrote: > >> Try with latest 2.8.x release >> >> On Wed, Nov 27, 2013

Re: Return of issue CAMEL-4107 (SendProcessor has not been started)

2013-11-27 Thread Stephan Burkard
Hi Claus I tried with 2.8.6 but I get the same error. Regards Stephan On Thu, Nov 28, 2013 at 7:58 AM, Claus Ibsen wrote: > Try with latest 2.8.x release > > On Wed, Nov 27, 2013 at 5:25 PM, Stephan Burkard > wrote: > > Hi Camel users > > > > I have a strang

Re: File Consuming

2013-11-26 Thread Stephan Burkard
Hi I don't know if I understand you correctly. You can use the File2 component (http://camel.apache.org/file2.html) to consume the files and route the generated messages to a simple bean that removes the content you don't want from the message body. Regards Stephan On Tue, Nov 26, 2013 at 12:1

Use of Camel ErrorHandler in transacted routes

2013-11-26 Thread Stephan Burkard
Hi Camel users I have a Camel workflow that spans two asynchronous transacted routes divided by queues. The second one is calling a direct-route that calls another direct-route (see below for detailed example Spring-DSL structure). The reason for the direct routes is that the processing of them mu