Reputation: 8127
What happens if I have many @JmsListener(destination = ...)
, listening for messages on different queues. Who gets to listen first, how can I control this behavior.
Upvotes: 0
Views: 270
Reputation: 174554
You cannot control the fine level behavior in any meaningful way; work is scheduled by the operating system scheduler.
You can control the behavior at a gross level by starting/stopping the listener containers - give the listeners an id
property and start/stop the containers via the JmsListenerEndpointRegistry
bean.
But you can't "control consumption" per your other question. I suggested there to use the JmsTemplate
instead.
Upvotes: 2