activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shahzad Bhatti <bha...@plexobject.com>
Subject How do I specify max retries for delivery and DLQ policies for dynamic queues
Date Mon, 18 May 2009 22:17:24 GMT

I am using ActiveMQ 5.2 with following configuration:
  <broker brokerName="US_Integ_RSP" persistent="true" useJmx="true"
xmlns="http://activemq.apache.org/schema/core">
        <!-- Destination specific policies using destination names or
wildcards -->
        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <policyEntry queue=">" memoryLimit="512mb">
                        <deadLetterStrategy>
                        <individualDeadLetterStrategy queuePrefix="DLQ." />
                        </deadLetterStrategy>
                    </policyEntry>
                    <policyEntry topic=">" memoryLimit="128mb">
                        <dispatchPolicy>
                            <strictOrderDispatchPolicy/>
                        </dispatchPolicy>
                        <subscriptionRecoveryPolicy>
                            <lastImageSubscriptionRecoveryPolicy/>
                        </subscriptionRecoveryPolicy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>
        <!-- Use the following to configure how ActiveMQ is exposed in JMX
-->
        <managementContext>
            <managementContext createConnector="true"/>
        </managementContext>
    <persistenceAdapter>
        <journaledJDBC journalLogFiles="5" dataDirectory="./var/" />
    </persistenceAdapter>

    <transportConnectors>
        <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
    </transportConnectors>

    <networkConnectors>
      <networkConnector name="default-us-integ-rsp"
uri="multicast://default" dynamicOnly="true" conduitSubscriptions="false"
decreaseNetworkConsumerPriority="false" />
    </networkConnectors>

I am using Spring 2.5 along with ActiveMQ to register listeners, e.g.
   <bean id="springJmsContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer"
init-method="start" destroy-method="stop">
        <property name="connectionFactory"
ref="staticJmsConnectionFactory"/>
        <property name="destination" ref="springEventBus"/>
        <property name="messageListener" ref="springJmsListener"/>
        <property name="pubSubNoLocal" value="true"/>
        <property name="sessionTransacted" value="true"/>
   </bean>



All of my queues are created dynamically so my question is how do I specify
maximum retries for delivery in case transaction fails and automatically
move those messages to DLQ.
-- 
View this message in context: http://www.nabble.com/How-do-I-specify-max-retries-for-delivery-and-DLQ-policies-for-dynamic-queues-tp23606362p23606362.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message