I have setting configuration in conf/activemq.xml about Redelivery and DLQ handling like this https://activemq.apache.org/message-redelivery-and-dlq-handling.html
But when I try to throw exception to see that will it work. It not work even send to default DLQ ActiveMQ.DLQ
@JmsListener(destination = "${queue-name}",
concurrency="${queue-concurrency}",
containerFactory="jmsListenerContainerFactory")
public void onMessage(TextMessage message) throws JMSException {
try {
LOG.debug("JMS Message = {}", message.getText());
throw new Exception();
// Do other thing.
}
catch (Exception e) {
throw new JMSException(e.getMessage());
}