Using SimpleMessageListenerContainer.start() to start listener threads in client machine to listen for messages from RabbitMQ. All listener threads have name as SimpleAsyncTaskExecutor-1 . Is there a way user can provide/set name of listener-thread (to help troubleshooting issue by seeing threadname and relating part of code that this thread belongs to)
Following is summary of my current implementation ---
I am using xml file with following tags to define connection factory, queue, binding etc. For example, XML tags used are Rabbit:queues , Rabbit:queue-arguments , Rabbit:direct-exchange , Rabbit:topic-exchange, Rabbit:bindings, rabbit:binding , Rabbit:Admin (with ConnectionFactory)
Following is code snippet to start listener---
SimpleMessageListenerContainer container= new SimpleMessageListenerContainer();
container.setConnectionFactory(messagingTopology.getConnectionFactory());
container.setQueueNames(new String[] { messagingTopology.getQueue().getName() });
MessageListenerAdapter adapter = new MessageListenerAdapter(listener);
container.setMessageListener(adapter);
container.start();