using jms messaging as example here. but probably other messaging impls (websocket, amqp, etc.) show the same behavior.
currently, only "plain" String destinations are supported for the destination argument of @JmsListener. we faced a use case where it made sense to pull those values out of properties. i think this can be generalized to a request for support of injection/resolution of value expressions for destination arguments (e.g. just like it works with @Value).
the following example code shows our current workaround, which could likely be implemented in a better way but it shows the desired behavior:
Thanks for report. Just a thought, the jmsListenerContainerFactory value in your @JmsListener is unecessary as it matches the name of the default value. Check the doc for more details.
This one is easy enough to make it before 4.1.GA. All attributes can now be resolved using property place holders. I'll apply the same logic for @RabbitListener wherever it makes sense.
zyro opened SPR-12134 and commented
using jms messaging as example here. but probably other messaging impls (websocket, amqp, etc.) show the same behavior.
currently, only "plain" String destinations are supported for the destination argument of
@JmsListener
. we faced a use case where it made sense to pull those values out of properties. i think this can be generalized to a request for support of injection/resolution of value expressions for destination arguments (e.g. just like it works with@Value
).the following example code shows our current workaround, which could likely be implemented in a better way but it shows the desired behavior:
thanks, zyro
Affects: 4.1 RC2
Issue Links:
Referenced from: commits 8c4388d
The text was updated successfully, but these errors were encountered: