You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2010/04/23 15:49:24 UTC

[jira] Resolved: (AMQ-2710) Validate camel route to pull from DLQ and reroute to destination after a delay

     [ https://issues.apache.org/activemq/browse/AMQ-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-2710.
-----------------------------

    Resolution: Fixed

> Validate camel route to pull from DLQ and reroute to destination after a delay
> ------------------------------------------------------------------------------
>
>                 Key: AMQ-2710
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2710
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Test Cases
>    Affects Versions: 5.3.1
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>             Fix For: 5.4.0
>
>
> Redelivery attempts pile up in the activemq RA and block a consumer in pure jms. A strategy where messag order is ignored and messages are rerouted to the original destination after some period can allow the broker to deal with the redelivery and allow the application to continue with valid messages while the remaining ones are pending.
> Using a no retry delivery policy and an individual DLQ policy allows redeliveries to be diverted to the DLQ immediately. Adding in a camel route that takes from the DLQ and schedules a delayed delivery to the original destination provided a clean alternative, at the cost of breaking queue order semantics for the pure JMS case.
> An example of such a camel route would be nice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Resolved: (AMQ-2710) Validate camel route to pull from DLQ and reroute to destination after a delay

Posted by kseelam <kr...@hotmail.com>.
Hi Gary

I am trying to use the work around  you mentioned in
https://issues.apache.org/activemq/browse/AMQ-2710

We are using 5.4 and  we assume we need to set this in
/apache-activemq-5.4.0/webapps/camel/WEB-INF/applicationContext.xml   (fyi,
Camel  is activated in jetty.xml)

We set it in applicationContext.xml as below..

<bean id="messageConverter"
class="org.apache.activemq.camel.converter.IdentityMessageReuseConverter" />

    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring" 
trace="true">

        <!-- You can use a <package> element for each root package to search
for Java routes -->
        <package>org.foo.bar</package>

        <!-- You can use Spring XML syntax to define the routes here using
the <route> element -->

        <route>
            <from uri="activemq:example.A"/>
            <to uri="activemq:example.B"/>
        </route>

    <route>
      <setHeader
headerName="CamelRedeliveryMarker"><constant>true</constant></setHeader>
      <setHeader
headerName="AMQ_SCHEDULED_DELAY"><constant>30000</constant></setHeader>
      <to pattern="InOnly"
uri="activemq:camelRedeliveryQ?explicitQosEnabled=true&amp;messageConverter=#messageConverter"/>
    </route>

    </camelContext>

But we are getting NoSuchElementException exception.

org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToStartRouteException:
java.util.NoSuchElementException
        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1126)
        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
 

Could you please help us how to configure this work-around correctly ?

Thank you,
Krishna.




 
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-2710-Validate-camel-route-to-pull-from-DLQ-and-reroute-to-destination-after-a-delay-tp2376481p2997810.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.