Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

activemq.xml Embedded Tomee redeliveryDelay

$
0
0
Hi,

I'm trying to apply redelivery policy to message posted in activemq. I'm
using tomee+ 1.7.0 (with activemq 5.10.0) and i use an external
configuration file (activemq.xml).
I follow the online documentation
(http://activemq.apache.org/message-redelivery-and-dlq-handling.html), but
the redelivery policy is not used at all!
This is my activemq.xml :
/<beans ...>
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="true"
start="true" brokerName="PMBrokerConfXml" schedulerSupport="true"
persistent="true">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry queue=">" producerFlowControl="true" >
<deadLetterStrategy>
<individualDeadLetterStrategy
queuePrefix="ERROR."
useQueueForQueueMessages="true" />
</deadLetterStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>

<plugins xmlns="http://activemq.apache.org/schema/core">
<redeliveryPlugin fallbackToDeadLetter="true"
sendToDlqIfMaxRetriesExceeded="true">
<redeliveryPolicyMap >
<redeliveryPolicyMap>

<defaultEntry>
<redeliveryPolicy
initialRedeliveryDelay="5000"

redeliveryDelay="3000"

maximumRedeliveries="3"

maximumRedeliveryDelay="14400000"

backOffMultiplier="2"

useExponentialBackOff="true"/>*
</defaultEntry>
</redeliveryPolicyMap>
</redeliveryPolicyMap>
</redeliveryPlugin>
</plugins>

<persistenceAdapter>
<kahaDB directory="D:/apache-tomee-1.7.0-plus/jmsdata/kahadb"
indexCacheSize="20000" ignoreMissingJournalfiles="true"
checkForCorruptJournalFiles="true" checksumJournalFiles="true"/>
</persistenceAdapter>

<transportConnectors>
<transportConnector uri="tcp://localhost:61616" />
</transportConnectors>

<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="64 mb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="100 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="50 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>

<shutdownHooks>
<bean xmlns="http://www.springframework.org/schema/beans"
class="org.apache.activemq.hooks.SpringContextHook" />
</shutdownHooks>

</broker>
</beans>/

What's working :
- i can send message to activemq
- i can see theses messages in activemq webconsole
- i can consume message
- When i send a "transaction rollback" during message consuming, after 6
try, messages are sent to "ERROR.[QueueName]" queue

What's not working :
- all the redeliveryPolicy is not used...
This is the dlqDeliveryFailureCause i can see in the error queue on a
message:
java.lang.Throwable: Exceeded redelivery policy limit:RedeliveryPolicy
{destination = null, collisionAvoidanceFactor = 0.15, maximumRedeliveries =
6, maximumRedeliveryDelay = -1, initialRedeliveryDelay = 1000,
useCollisionAvoidance = false, useExponentialBackOff = false,
backOffMultiplier = 5.0, redeliveryDelay = 1000}, cause:null

None of the redeliveryPolicy attribute is used.

Did i make any configuration mistake?

Clue : redeliveryPlugin is used. If i set "fallbackToDeadLetter" and
"sendToDlqIfMaxRetriesExceeded" to false, message in errors disappears (they
are not put into an error queue).

Thanks in advance

Clément

Viewing all articles
Browse latest Browse all 5648

Trending Articles