What are the core JMS-related objects required for each JMS-enabled application?

Jerry Smith

Each JMS-enabled client must establish the following:

  • A connection object provided by the JMS server (the message broker)
  • Within a connection, one or more sessions, which provide a context for message sending and receiving
  • Within a session, either a queue or topic object representing the destination (the message staging area) within the message broker
  • Within a session, the appropriate sender or publisher or receiver or subscriber object (depending on whether the client is a message producer or consumer and uses a point-to-point or publish/subscribe strategy, respectively)
  • Within a session, a message object (to send or to receive)