I am using JSMItemWriter in a spring Batch application. Is it possible to dynamically set the queue name or dynamically define a jmsTemplate at runtime instead of defining it as a bean in the code
Depending on the type of record passed to the JSMItemWriter, i would need to write to a different queue.
You can configure a jms writer for each queue and use a ClassifierCompositeItemWriter. This composite writer will classify items dynamically at runtime and call the delegate writer accordingly.