Monday, June 18, 2012

Ways that JMS Messages can be consumed


  • Synchronously. A subscriber or a receiver explicitly fetches the message from the destination by calling the receivemethod. The receive method can block until a message arrives or can time out if a message does not arrive within a specified time limit.
  • Asynchronously. A client can register a message listener with a consumer. A message listener is similar to an event listener. Whenever a message arrives at the destination, the JMS provider delivers the message by calling the listener'sonMessage method, which acts on the contents of the message.

No comments:

Post a Comment