About the advanced configuration I'd recommand you to ask on activemq list - if you still have issue we can help you but I think we have more experience feedbacks than design one on this point, at least for me.
About your PS: it is just cause we forced at a point the AMQ scheduler deactivation - it is fixed now - so there is no way you change it through tomee.xml without using the snapshot. Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2015-01-09 10:59 GMT+01:00 joeleclems <[email protected]>: > Thanks for yours answers, > > I tried to configure the embedded activemq with activemq.xml as describe > here : > http://tomee.apache.org/jms-resources-and-mdb-container.html > > To begin, 2 things : > - there is a dead link in this page (link to xbean-spring-3.9.jar) > - i had to add more libraries than described because of classeNotFound > exception : spring-expression-3.2.9.jar and activemq-spring-5.10.0.jar > > So now my configuration is that one : > *tomee.xml* > /<tomee> > (...) > <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter"> > BrokerXmlConfig = > xbean:file:D:/apache-tomee-1.7.0-plus/conf/activemq.xml > ServerUrl = tcp://localhost:61616 > </Resource> > <Resource id="MyJmsConnectionFactory" > type="javax.jms.QueueConnectionFactory"> > ResourceAdapter = MyJmsResourceAdapter > </Resource> > <Container id="MyJmsMdbContainer" ctype="MESSAGE"> > ResourceAdapter = MyJmsResourceAdapter > </Container> > <Resource id="MyQueue1" type="javax.jms.Queue"> > destination = MyQueue1 > </Resource> > </tomee>/ > > *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 consumme 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 > > PS : i don't understand why i need to use a configuration file instead of > using configuration into tomee.xml. > > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/TomEEplus-Activemq-RedeliveryDelay-not-working-tp4673241p4673348.html > Sent from the TomEE Users mailing list archive at Nabble.com.
