activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: A few redelivery questions
Date Tue, 02 May 2006 13:56:02 GMT
On 5/1/06, Litton, Tom - CEPM <Tom.Litton@cepm-us.com> wrote:
> I have a few questions about how messages get redelivered. I'm using an embedded broker
(in tomcat).  The version is 4.0 RC3.
>
> 1.  How do you configure the redelivery delay for all queues.  Right now i have the configuration:
>     <destinationPolicy>
>       <policyMap>
>         <policyEntries>
>           <policyEntry queue="*">
>             <redeliveryPolicy initialRedeliveryDelay="10000" useExponentialBackOff="true"
backOffMultiplier="5" maximumRedeliveries="5" />
>           </policyEntry>
>
>         </policyEntries>
>       </policyMap>
>     </destinationPolicy>
>
> But it seems to have no effect.  The redelivery delay is still 1 second.  Should I specify
">" or "*.>" for all queues?

Use > for all queues.

I'm guesing the queue name has a dot in it right?


>  I'm setting the XML file location using the property brokerXmlConfig and calling the
method ActiveMQConnectionFactory.setProperties.  Does this still work in 4.0?

No, I'm afraid not.

The best way to create an embedded broker from an XML configuration
file is to either use the BrokerFactoryBean in your spring.xml or just
use the BrokerService POJO directly

http://activemq.org/How+do+I+embed+a+Broker+inside+a+Connection


> 2.  The redelivery policy seems to take effect on calls to Session.recover and Session.rollback.
 What happens to the unacknowledged messages if neither of those methods get called?  Will
they ever get redelivered before the broker is restarted?

Yes - redelivery happens when a session is closed (or a client
disconnects) - then any messages delivered to a consumer/session that
are not acknowledged will get redelivered.

Using the inactivity monitor, you can get the broker to kill any
'hung' clients to ensure messages are redelivered promptly if a client
locks up.

--

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message