activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: How to configure redeliveryPlugin of ActiveMQ using Spring
Date Wed, 10 Jul 2013 20:43:26 GMT
Charles,

try this:

<plugins>
<redeliveryPlugin sendToDlqIfMaxRetriesExceeded="true">
  <redeliveryPolicyMap>
     <redeliveryPolicyMap>
        <defaultEntry>
            <redeliveryPolicy maximumRedeliveries="4"/>
        </defaultEntry>
     </redeliveryPolicyMap>
  </redeliveryPolicyMap>
  </redeliveryPlugin>
</plugins>

can use <*redeliveryPolicyEntries>* instead of default, or beside default
as well.

Cheers


On Wed, Jul 10, 2013 at 3:19 PM, Charles Moulliard <ch007m@gmail.com> wrote:

> Hi,
>
> Here is the java code to be used to configure redeliveryPlugin
>
>         broker = new BrokerService();
>         broker.setSchedulerSupport(true);
>
>
>         RedeliveryPlugin redeliveryPlugin = new RedeliveryPlugin();
>
>         RedeliveryPolicy brokerRedeliveryPolicy = new RedeliveryPolicy();
>         brokerRedeliveryPolicy.setRedeliveryDelay(redeliveryDelayMillis);
>
> brokerRedeliveryPolicy.setInitialRedeliveryDelay(redeliveryDelayMillis);
>
> brokerRedeliveryPolicy.setMaximumRedeliveries(maxBrokerRedeliveries);
>
>         RedeliveryPolicyMap redeliveryPolicyMap = new
> RedeliveryPolicyMap();
>         redeliveryPolicyMap.setDefaultEntry(brokerRedeliveryPolicy);
>         redeliveryPlugin.setRedeliveryPolicyMap(redeliveryPolicyMap);
>
>         broker.setPlugins(new BrokerPlugin[]{redeliveryPlugin});
>
> but when I try to configure it within a spring xml file, this syntax is not
> accepted
>
>   <broker xmlns="http://activemq.apache.org/schema/core"
>           brokerName="spb-local"
>           dataDirectory="activemq-spb"
>           persistent="true">
>
>     <persistenceAdapter>
>       <kahaDB directory="activemq-spb/kahadb"/>
>     </persistenceAdapter>
>
>     <plugins>
>       <redeliveryPlugin sendToDlqIfMaxRetriesExceeded="true"
> redeliveryPolicyMap="">
>           <redeliveryPolicyMap>
>             <redeliveryPolicy maximumRedeliveries="4"/>
>           </redeliveryPolicyMap>
>       </redeliveryPlugin>
>     </plugins>`
>
> As I haven't been able to find an example in code of activemq, what should
> be the syntax to be used ?
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message