difference between synchronous and asynchronous message receiver
posted 8 years ago
In JMS, we can configure a synchronous message reciever using QueueReceiver.receive() method. Or we can do it asynchronously by setting a message listener. I have heard that the second asynchronous approach is better than the first approach when we have a lot of requests hitting our application.
Here is my understanding on this. Somebody please say if this is correct or not. I badly need this.
When we have say, 100 connections to the application, the synchronous connection initiates 100 live connections to the queue and lsitens on it. So we have 100 live connections. In the asynchronous way, if we set a message listener, only one connection listens on it for all the 100 listeners. Is this correct???
Or is there anything more to it? Help me please...