Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

difference between synchronous and asynchronous message receiver  RSS feed

nibla jose
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!