-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Maciej Miklas opened SPR-13774 and commented
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 @ResponseTTL, or something more generic: @ResponseSetup
Other possibility would be to give us option to pragmatically configure MessageProducer.
The MessagingMessageListenerAdapter has already a suitable method: #postProcessProducer(), but currently it's impossible to register custom implementation.
The reason for that is that the class MethodJmsListenerEndpoint has factory method creating MessagingMessageListenerAdapter, but MethodJmsListenerEndpoint cannot be extended because JmsListenerAnnotationBeanPostProcessor creates its instance inside of #processJmsListener().
Actually it would be enough to create factory method on JmsListenerAnnotationBeanPostProcessor that would create instance of MethodJmsListenerEndpoint.
Affects: 4.1.8, 4.2.3
Issue Links:
- Configurable QoS properties for messages sent by @JmsListener [SPR-13775] #18349 Configurable QoS properties for messages sent by
@JmsListener("is depended on by")
Referenced from: commits d04f785, 9589749
Backported to: 4.1.9