Skip to content

Instantly share code, notes, and snippets.

@fganora
Created October 19, 2016 07:19
Show Gist options
  • Save fganora/3e95550121d1bd0f4730b448b13173e8 to your computer and use it in GitHub Desktop.
Save fganora/3e95550121d1bd0f4730b448b13173e8 to your computer and use it in GitHub Desktop.
Mule configuration for ActiveMQ connector with RedeliveryPolicy
<spring:beans>
<!-- ActiveMQ -->
<spring:bean class="org.apache.activemq.RedeliveryPolicy" id="redeliveryPolicy">
<spring:property name="maximumRedeliveries" value="5"/>
<spring:property name="initialRedeliveryDelay" value="5000"/>
<spring:property name="redeliveryDelay" value="2000"/>
<spring:property name="useExponentialBackOff" value="false"/>
<spring:property name="backOffMultiplier" value="2"/>
</spring:bean>
<spring:bean class="org.apache.activemq.ActiveMQConnectionFactory" id="amqFactory" lazy-init="true">
<spring:property name="brokerURL" value="failover:(tcp://localhost:61616)"/>
<spring:property name="redeliveryPolicy" ref="redeliveryPolicy"/>
</spring:bean>
</spring:beans>
<jms:activemq-connector connectionFactory-ref="amqFactory" doc:name="Active MQ" maxRedelivery="5" name="jmsConnector"
persistentDelivery="true" specification="1.1" validateConnections="true"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment