Java Message Service(JMS)

JMS (Java Message Service) is a Java API that allows java applications to communicate with other messaging implementations by creating, sending, receiving, and reading messages.

Java Message Service(JMS)

Java Message Service(JMS)

     


JMS (Java Message Service) is a Java API that allows java applications to communicate with other messaging implementations by creating, sending, receiving, and reading messages. It supports two models:

  1. point-to-point or queuing model: In this model, a producer sends messages to a particular queue and a consumer gets messages from the queue. Only one consumer will get the message and producer knows the consumer of the message.
  2. publish and subscribe model: In this model, many subscribers can receive messages on a particular message topic. Publisher and subscriber both are unaware of each other.

Java package "javax.jms" provides JMS api. To use JMS, one must have a JMS provider that can manage the sessions and queues. There are free, open source providers like Apache ActiveMQ, OpenJMS, JBoss Messaging etc and proprietary providers like BEA Weblogic, Oracle AQ etc.