In the Pub/Sub domain, applications subscribe to topics of interest. The application calls the
subscribeprocedure in
pubsubsession.p or
jmssession.p with the topic name and a handle to the Message Consumer object. The application implements a message-handling routine for handling the incoming messages, as well as a Message Consumer object that contains the message handler and provides context to the application when it processes messages.