activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <ch0...@gmail.com>
Subject Fwd: How to configure redeliveryPlugin of ActiveMQ using Spring
Date Wed, 10 Jul 2013 19:19:18 GMT
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

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