I want to know how can we add/delete some listener from listener container at run time.
I have configured listener container as below :
<rabbit:listener-container connection-factory="connectionFactory">
<rabbit:listener ref="Listener0" queues="ListenerQueue0" />
<rabbit:listener ref="Listener1" queues="ListenerQueue1" />
<rabbit:listener ref="Listener2" queues="ListenerQueue2" />
One method comes to mind is we can add/remove 'rabbit:listener' from xml at run time and refresh application context, so new config will be loaded. Is this good way of doing ?
Please let me know other suggestions as well. Thanks in advance.