You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by tobinibot <to...@gmail.com> on 2007/01/05 18:15:19 UTC

Configuring Redelivery

I'm sorry if this is a stupid question, but I've spent all morning looking,
and I haven't been able to find it yet.


I'd like to configure the redelivery options.  I found the activemq.xsd
schema file that defines the redeliveryPolicy element (and associated
complex type). I believe that element is exactly what I'm looking for.


However, I can't figure out where to put it.  The only config file I've been
able to find is my $ACTIVEMQ_DIR/conf/activemq.xml, which does not look it
follows that schema.  Plus, the redeliveryPolicy element is supposed to go
in a connectionFactory element, and my activemq.xml does not have any of
those.


Again, I'm sorry if this is a really basic question, but it's stumped me all
morning.  Thanks.


Tobin

-- 
View this message in context: http://www.nabble.com/Configuring-Redelivery-tf2926724.html#a8181951
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Configuring Redelivery

Posted by Adrian Co <ac...@exist.com>.
Hi,

There are 3 ways to accomplish this:

1. Via Xbean Spring dependency injection:
   <connectionFactory brokerURL="vm://localhost" 
xmlns="http://activemq.org/config/1.0">

    <redeliveryPolicy>
      <redeliveryPolicy maximumRedeliveries="20"/>
    </redeliveryPolicy>
  </connectionFactory>

2. Via broker URL:
   ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?jms.redeliveryPolicy.maximumRedeliveries=3434");

3. Via POJO:
   ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory();
   cf.getRedeliveryPolicy().setMaximumRedeliveries(3434);



tobinibot wrote:
> I'm sorry if this is a stupid question, but I've spent all morning looking,
> and I haven't been able to find it yet.
>
>
> I'd like to configure the redelivery options.  I found the activemq.xsd
> schema file that defines the redeliveryPolicy element (and associated
> complex type). I believe that element is exactly what I'm looking for.
>
>
> However, I can't figure out where to put it.  The only config file I've been
> able to find is my $ACTIVEMQ_DIR/conf/activemq.xml, which does not look it
> follows that schema.  Plus, the redeliveryPolicy element is supposed to go
> in a connectionFactory element, and my activemq.xml does not have any of
> those.
>
>
> Again, I'm sorry if this is a really basic question, but it's stumped me all
> morning.  Thanks.
>
>
> Tobin
>
>