I would like to know what happens if MessageListenerContainer, pointing to a topic, recieves 2 (or more) messages at the same time.
For example, 2 users of the app triggers a publish at the same time, hence 2 jmstemplate calls sending 2 different messages to the same topic.
How will the container handle this?
- Will the container create 2 threads calling the MessageListenerAdapter (which should implemented as thread-safe) at same time?
- Or will the container have just 1 thread calling the MessageListenerAdapter serially (sequentially)?