0
如何在郵件發送至DLQ時發送電子郵件通知。如何在郵件發送至DLQ時發送電子郵件通知
我做下面的代碼
<spring:beans>
<spring:bean id="redeliveryPolicy" class="org.apache.activemq.RedeliveryPolicy">
<spring:property name="maximumRedeliveries" value="5" />
<spring:property name="initialRedeliveryDelay" value="500" />
<spring:property name="maximumRedeliveryDelay" value="10000" />
<spring:property name="useExponentialBackOff" value="false" />
<spring:property name="backOffMultiplier" value="3" />
</spring:bean>
<spring:bean id="amqFactory"
class="org.apache.activemq.ActiveMQConnectionFactory" lazy-init="true">
<spring:property name="brokerURL" value="${jms.brokerUrl}" />
<spring:property name="redeliveryPolicy" ref="redeliveryPolicy" />
</spring:bean>
</spring:beans>
<!-- ActiveMQ Connection factory -->
<jms:activemq-connector name="Active_MQ10"
specification="1.1" username="${jms.username}" password="${jms.password}"
brokerURL="${jms.brokerUrl}" validateConnections="true"
persistentDelivery="true" doc:name="Active MQ" connectionFactory-ref="amqFactory"
numberOfConcurrentTransactedReceivers="2">
</jms:activemq-connector>
<jms:endpoint name="delivery-queue-A" connector-ref="Active_MQ10"
queue="delivery-queue-A" doc:name="JMS">
<jms:transaction action="BEGIN_OR_JOIN" />
</jms:endpoint>
如何發送我們重試失敗,消息被傳遞到DLQ電子郵件通知。