Messaging modes

In JMS, a connection factory is the precursor to a connection and this connection is the precursor to a session. It is in the session that messages, message producers and message consumers are created. The message producer sends messages to a destination while a message consumer receives messages from a destination. A destination can be either a topic or a queue.

JMS provides two messaging models as described in the following sections: