I have a question concerning the creation of a dynamic JMS durable subscriptions and, more generally, about how to deal with dynamic situations in Spring 5 and SpringBoot. For example, in order to make a durable subscription one needs the following:
@JmsListener(destination = "...", id = "...", subscription = "...", containerFactory = "...")
Now, what if the subscription needs to be done in a REST endpoint, for example:
@RequestMapping(value = "/subscribe/", method = RequestMethod.POST)
public ResponseEntity subscribe(@RequestBody JmsTopicSubscriberInfo jtsi) throws JMSException
where the JmsTopicSubscriberInfo class contains the clientID, the subscription name, etc. as properties ? Is that possible to express that in Spring or should one use raw JMS in such a case ?