Hi mvn camel:run is a maven target to run your camel project standalone, its meant for quick and dirty prototype and trying it our along as you code.
If you do not use maven for your project then you can start Camel by the Main class in org.apache.camel.spring.Main (that is actually started by mvn camel:run). A little more here: http://activemq.apache.org/camel/running-camel-standalone.html Med venlig hilsen Claus Ibsen ...................................... Silverbullet Skovsgårdsvænget 21 8362 Hørning Tlf. +45 2962 7576 Web: www.silverbullet.dk -----Original Message----- From: vguna [mailto:[EMAIL PROTECTED] Sent: 7. juli 2008 16:22 To: camel-user@activemq.apache.org Subject: RE: spring DeadLetterChannel redelivery config Hi. Ehhw. I'm afraid I'm not too deep into camel yet. camel:run means that it is a maven target on the source distribution of camel? I can try that of course... Claus Ibsen wrote: > > Hi > > Can you try running it outside ActiveMQ eg from camel:run. To see that it > works. Then we can identify the problem with ActiveMQ later. > > I have added a unit test to camel-spring that works with your > configuration. > It gets the DeadLetterChannel that is configured as a spring bean and uses > the redelivery prorperties as well. > > > > Med venlig hilsen > > Claus Ibsen > ...................................... > Silverbullet > Skovsgårdsvænget 21 > 8362 Hørning > Tlf. +45 2962 7576 > Web: www.silverbullet.dk > > -----Original Message----- > From: vguna [mailto:[EMAIL PROTECTED] > Sent: 7. juli 2008 13:49 > To: camel-user@activemq.apache.org > Subject: RE: spring DeadLetterChannel redelivery config > > > Hi again. > > I recently encountered that the redeliveryPolicy still doesn't work as > expected. Basically it does the redelivery - but with default settings as > it > seems. > > Tried this configuration in activemq.xml with camel 1.4 snapshot: > > <camelContext id="camel" > xmlns="http://activemq.apache.org/camel/schema/spring"> > > <route errorHandlerRef="deadLetterErrorHandler"> > <from uri="activemq:NEW" /> > </route> > </camelContext> > > <bean id="deadLetterErrorHandler" > class="org.apache.camel.builder.DeadLetterChannelBuilder"> > <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/> > </bean> > > <bean id="redeliveryPolicyConfig" > class="org.apache.camel.processor.RedeliveryPolicy"> > <property name="maximumRedeliveries" value="3"/> > <property name="initialRedeliveryDelay" value="10000"/> > <property name="useExponentialBackOff" value="true"/> > <property name="backOffMultiplier" value="2" /> > </bean> > > Redelivery takes place in 30 seconds with a retry count of 5 instead of > the > values configured. This might be because the errorHandlerRef on route > isn't > evaluated at all. If I change this to foobar, it doesn't complain about it > on startup. > > So what I'm doing wrong? > > Regards, > Veit > > > > > Claus Ibsen wrote: >> >> Hi >> >> Thanks a lot for sharing this. Handy for others as well. >> There could be an issue with the initial delay vs. repated delay. >> >> Do you mind creating a JIRA ticket for this - then its not forgotten. >> Would be nice with a special delay for the first redelivery and then >> another setting for the repeated delay. >> >> >> Med venlig hilsen >> >> Claus Ibsen >> ...................................... >> Silverbullet >> Skovsgårdsvænget 21 >> 8362 Hørning >> Tlf. +45 2962 7576 >> Web: www.silverbullet.dk >> >> -----Original Message----- >> From: vguna [mailto:[EMAIL PROTECTED] >> Sent: 7. juli 2008 11:17 >> To: camel-user@activemq.apache.org >> Subject: Re: spring DeadLetterChannel redelivery config >> >> >> Hi James. >> >> Thanks for the reply. It seems to work now. For all, who asking >> themselves >> how a xml configuration for this will look like, here's an example: >> >> <camelContext id="camel" >> xmlns="http://activemq.apache.org/camel/schema/spring"> >> >> <route errorHandlerRef="deadLetterErrorHandler"> >> <from uri="activemq:NEW" /> >> </route> >> >> </camelContext> >> >> <bean id="deadLetterErrorHandler" >> class="org.apache.camel.builder.DeadLetterChannelBuilder"> >> <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/> >> </bean> >> >> <bean id="redeliveryPolicyConfig" >> class="org.apache.camel.processor.RedeliveryPolicy"> >> <property name="maximumRedeliveries" value="4"/> >> <property name="initialRedeliveryDelay" value="30000"/> >> <property name="useExponentialBackOff" value="true"/> >> </bean> >> >> >> Still one problem left. When an error occurs, a redelivery is executed >> immediately - without the specified delay. After >> that, the redeliveryDelay is used correctly.Is this by design? Would be >> nice, if one could configure a "redeliveryDelay" and a >> "initialRedliveryDelay". Or just simply use the delay on the first >> redelivery attempt, too. >> >> Regards, >> Veit >> >> >> >> >> >> James.Strachan wrote: >>> >>> I've recently fixed this... >>> >>> https://issues.apache.org/activemq/browse/CAMEL-662 >>> >>> so you can now specify an errorHandlerRef on a <camelContext> a >>> <route> or <pipeline> element to refer to a spring bean which could be >>> a DeadLetterChannelBuilder or a TransactionalErrorHandlerBuilder etc. >>> >>> i.e. you can define the errror handler as a normal spring bean now >>> >>> 2008/3/7 Marc Giger <[EMAIL PROTECTED]>: >>>> Hi, >>>> >>>> I'm trying to configure the DeadLetterChannel with spring. >>>> Unfortunately without success. No matter where I declare the >>>> <onException>, camel tries to redeliver the message 5 times in the case >>>> of an exception. >>>> >>>> How must the following configuration be modified so that camel just >>>> tries to deliver once? >>>> >>>> <camelContext id="camel" >>>> xmlns="http://activemq.apache.org/camel/schema/spring"> >>>> <route> >>>> <from uri="cxf:bean:routerEndpoint"/> >>>> <onException> <!-- no effect --> >>>> <redeliveryPolicy> >>>> <maximumRedeliveries>0</maximumRedeliveries> >>>> </redeliveryPolicy> >>>> </onException> >>>> <process ref="decryptProcessor"> >>>> <onException> <!-- no effect --> >>>> <redeliveryPolicy> >>>> <maximumRedeliveries>0</maximumRedeliveries> >>>> </redeliveryPolicy> >>>> </onException> >>>> </process> >>>> <choice> >>>> <when> >>>> <methodCall bean="endpointSelector" >>>> method="matches"/> <to >>>> uri="cxf:bean:serviceEndpoint?dataFormat=MESSAGE"/> </when> >>>> <otherwise> >>>> <to >>>> uri="cxf:bean:localEndpoint"/> </otherwise> >>>> </choice> >>>> </route> >>>> </camelContext> >>>> >>>> Thanks a lot! >>>> >>>> Cheers, >>>> >>>> Marc >>>> >>> >>> >>> >>> -- >>> James >>> ------- >>> http://macstrac.blogspot.com/ >>> >>> Open Source Integration >>> http://open.iona.com >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/spring-DeadLetterChannel-redelivery-config-tp15906561s22882p18312842.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> > > -- > View this message in context: > http://www.nabble.com/spring-DeadLetterChannel-redelivery-config-tp15906561s22882p18314952.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/spring-DeadLetterChannel-redelivery-config-tp15906561s22882p18317673.html Sent from the Camel - Users mailing list archive at Nabble.com.