Can you please suggest a way to get dynamically the list of queues listen to by rabbitMQ spring RabbitListener (org.springframework.amqp.rabbit.annotation.RabbitListener)
Here is the example of my Listener which handles messages from a lot of queues (the list can be updated in the properties file) I want to get the list in another service dynamically :
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;
@Service
public class GenericListener {
@RabbitListener(queues = {
"${queue1}", "${queue2}", "${queue3}", "${queue4}", "${queue5}"
})
public void receiveMessage(Message message) {
}
}
the question specifically is : how to dynamically get bean interface RabbitListener params at runtime ?