Creating message producers

Create one or more message producers for sending and publishing messages.

Beginning in version 6.0, EAServer provides a common message producer object that you can use for both sending and publishing messages.

The following code fragment creates a MessageProducer object called “mySender” using the previously created Session object mySession, and specifies the name of the message queue destination myQueue:

MessageProducer mySender =    mySession.createProducer(myQueue);

When you create a message producer, you can specify default values for the following properties:

When you no longer need a message producer, call MessageProducer.close to release its resources.