NonStop JMS C++ API Programmer's Guide
NSJMS C++ API Classes and Methods
NonStop Server for Java Message Service C++ API Programmer’s Guide—526459-002
4-5
Producer Class
Producer Class
The Producer class is a client that uses a message producer to send messages to a
destination. A Producer is created by passing a destination to a createProducer()
method supplied by a Session.
Session Class
The Session class is a context used to create and free all NSJMS C++ API objects. A
Session provides methods for creating Consumers (receivers and subscribers),
Producers, Durable Subscribers, BytesMessages, MapMessages, ObjectMessages,
StreamMessages, and TextMessages.
Producer Methods Description
send
Send a message to the destination. Use the Producer's default
delivery mode and priority, and use the Destination’s default time to
live.
send
Send a message to a destination specifying delivery mode and
priority, but use the Destination’s default time to live.
send
Send a message to a destination specifying delivery mode, priority
and time to live.
Session Methods Description (page1of2)
Session
This is the Session constructor. It is used by clients as the first
call to initiate an NSJMS C++ API session.
createConsumer
Create a Consumer for the specified destination. A client uses
a message Consumer to consume/receive messages from a
destination.
createDurableSubscriber
Creates or restarts a durable subscriber (consumer) instance
given a Client Id, Subscription Name, and Topic Name.
createProducer
Create a Producer for the specified destination. A client uses a
Producer for publishing/sending messages to a destination.
createMessage
Create an empty message, a message with headers and
properties only, no message body.
createTextMessage
Create a TextMessage.
createStreamMessage
Create a StreamMessage.
createMapMessage
Create a MapMessage.
createObjectMessage
Create a ObjectMessage.
createBytesMessage
Create a ByteMessage.
freeConsumer
Deallocates resources for a Consumer instance.