Announcement Announcement Module
No announcement yet.
Spring JMS concurrent Listners Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring JMS concurrent Listners


    I've configured 10 concurrent listeners using spring and jms/ActiveMQ, but in the ActiveMQ browser shown as 2 consumers and pending reuests in queue are 100. Why the concurrent consumers are not consuming the requests in the queue?
    Is it depends on load? and what type of load, system load or queue load or any other load?


  • #2
    Everything I've seen suggests that if you share a connection across multiple session then you'll get one consumer of the queue. By concurrent consumer I think Spring means that order of processing isn't guaranteed but whatever is pulled of the queue is dispatched to an executor thread pool where mutliple threads can concurrently process what's already been pulled of the queue. I'd like to understand more about how acknowledgements suppose to work because I want a model that assures me that if I acknowledge this message I'm only acknowledging this message and when I acknowledge a message it should be removed from the queue.Whenever you introduce dispatch to a threadpool I believe acknowledgement happens before dispatch and so there's still an opportunity IMHO to lose messages after acknowledgement occurs and before worker thread finishes.

    Care to be proven wrong on this one.