Hi,

I use Dead Letter Exchange(DLX) and spring-retry for the bussness exceptions handling when consuming a message.

I hope, when certain exception is throwed, i will retry it. if max-retry-count is exhausted, and the message is still not be processing appropriately, i will not requeue it any more, and put it to the dead-letter-exchange.

Actual case, the message has been retry max-times, and processing still fails. But, the message has not been delivered to the dead-letter-exchange. it's gone, lost.

i don't know why? here is my xml files:

Producer:
Code:
	<rabbit:connection-factory id="connectionFactory"
		username="guest" password="guest"
		host="192.168.1.234"/>

	<rabbit:admin connection-factory="connectionFactory" />
	
	<rabbit:template id="rabbitTemplate"
		connection-factory="connectionFactory" channel-transacted="true"
		exchange="asyncservice.order.exchange" />

	<rabbit:queue name="ha.order.fujian.queue" />
	
	<rabbit:queue name="ha.order.yunan.queue" />

	<rabbit:topic-exchange name="asyncservice.order.exchange">
		<rabbit:bindings>
			<rabbit:binding queue="ha.order.fujian.queue" pattern="#.fujian" />
			<rabbit:binding queue="ha.order.yunan.queue" pattern="#.yunan" />
		</rabbit:bindings>
	</rabbit:topic-exchange>
consumer:
Code:
	<rabbit:connection-factory id="connectionFactory"
		username="guest" password="guest"
		host="192.168.1.234"/>

	<rabbit:admin connection-factory="connectionFactory" />

	<rabbit:queue name="ha.order.fujian.queue" />
	
	<rabbit:queue name="ha.order.yunan.queue" />
		
	<rabbit:queue name="ha.order.fujian.queue.dead">
		<rabbit:queue-arguments>
			<entry key="x-dead-letter-exchange" value="asyncservice.order.exchange.dead" />
		</rabbit:queue-arguments>
	</rabbit:queue>
	
	<rabbit:queue name="ha.order.yunan.queue.dead">
		<rabbit:queue-arguments>
			<entry key="x-dead-letter-exchange" value="asyncservice.order.exchange.dead" />
		</rabbit:queue-arguments>
	</rabbit:queue>

	<rabbit:topic-exchange name="asyncservice.order.exchange.dead">
		<rabbit:bindings>
			<rabbit:binding queue="ha.order.fujian.queue.dead" pattern="#.fujian" />
			<rabbit:binding queue="ha.order.yunan.queue.dead" pattern="#.yunan" />
		</rabbit:bindings>
	</rabbit:topic-exchange>
	
	<rabbit:listener-container
		connection-factory="connectionFactory" channel-transacted="true"
		transaction-manager="rabbitTransactionManager" transaction-size="1"
		prefetch="100" concurrency="10" advice-chain="retryInterceptor" >
		<rabbit:listener queues="ha.order.fujian.queue" ref="fujianMsgHandle"
			method="handleMessage" />
		<rabbit:listener queues="ha.order.yunan.queue" ref="yunanMsgHandle"
			method="handleMessage" />
	</rabbit:listener-container>
	
	<bean id="rabbitTransactionManager" class="org.springframework.amqp.rabbit.transaction.RabbitTransactionManager">
		<property name="connectionFactory" ref="connectionFactory"/>
	</bean>
	
	<bean id="retryInterceptor" class="org.springframework.amqp.rabbit.config.StatefulRetryOperationsInterceptorFactoryBean">
		<property name="messageRecoverer" ref="rejectAndDontRequeueRecoverer"/>
		<property name="retryOperations" ref="retryTemplate" />
	</bean>	
	
	<bean id="rejectAndDontRequeueRecoverer" class="org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer"/>
	
	<bean id="retryTemplate" class="org.springframework.retry.support.RetryTemplate">
		<property name="backOffPolicy">
			<bean class="org.springframework.retry.backoff.ExponentialBackOffPolicy">
				<property name="initialInterval" value="5000" />
				<property name="maxInterval" value="120000" />
				<property name="multiplier" value="2" />
			</bean>		
		</property>
		<property name="retryPolicy">
			<bean class="org.springframework.retry.policy.SimpleRetryPolicy">
				<property name="maxAttempts" value="3" />
			</bean>		
		</property>
	</bean>

Am I missing a configuration setting or is it a bug?
I am using spring-amqp 1.1.3

Thanks for your help.