Yeah Tim, Thanks for your reply! We do have a consumer for the topic, but I think it should not have impact for TTL setting for topic. even there is no consumer, if TTL expired. message in topic should be moved to deadletterqueue right? But if the consumer exists. it will always pick up message quickly , therefore we are not able to reproduce exceeding TTL problem for topic.
BTW, below is my code of RedeliveryPolicy for topic and queue When error happened and MaximumRedeliveries exceeded. the message for topic will not be moved to deadLetterqueue as configured., but it works for queue. RedeliveryPolicy queuePolicy =new RedeliveryPolicy(); queuePolicy.setInitialRedeliveryDelay(initialRedeliveryDelay); queuePolicy.setRedeliveryDelay(redeliveryDelay); queuePolicy.setUseExponentialBackOff(true); queuePolicy.setMaximumRedeliveries(maximumRedeliveries); RedeliveryPolicy topicPolicy = new RedeliveryPolicy(); topicPolicy.setInitialRedeliveryDelay(0); topicPolicy.setRedeliveryDelay(1000); topicPolicy.setUseExponentialBackOff(false); topicPolicy.setMaximumRedeliveries(3); // Receive a message with the JMS API RedeliveryPolicyMap map = connectionFactory.getRedeliveryPolicyMap(); map.put(new ActiveMQTopic(">"), topicPolicy); map.put(new ActiveMQQueue(">"), queuePolicy); -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html