Hello,
I've a
Java Spring boot application, in which I need to dynamically create multiple Spring JMS listeners at runtime, depending on the configuration in a table in Sql server database.
This configuration includes name of the various listeners and their corresponding properties(for e.g. hostname, channel name, queue manager, queue name, port number, etc). The application can receive multiple messages concurrently from different message brokers.
Please see the code details as per below.
My questions are:
1. Is it ok to use executor service here? or should I use "Thread
thread = new Thread(runnable);" approach?
2. Will this code be able to gracefully handle messages received concurrently, with a volume of say 1500 messages to be handled by each of the listeners?
My Code:
Thank you!