Allow for setting TTL on a response sent by @JmsListener [SPR-13774] #18348
Currently AbstractAdaptableMessageListener#sendResponse(...) calls producer.send(response) which results with JMS Message without TTL.
We are using ActiveMQ with persistent messages, in order to avoid queue pollution we have to set TTL on every message.
One possibility to solve this issue is to introduce new annotation, like
Other possibility would be to give us option to pragmatically configure MessageProducer.
Affects: 4.1.8, 4.2.3
Backported to: 4.1.9
Juergen Hoeller commented
Good point, we should at least allow for extension through consistent availability of factory methods there. We'll address that right away for 4.2.4 and possibly 4.1.9 as well.
As for a first-class TTL setting, a per-listener annotation might be a bit overkill... That said, a "timeToLive" property on
Maciej Miklas commented
Factory method is really welcome extension - thank you !
Setting default TTL on