Creates a MessageProducer to send messages to the specified destination.

A client uses a MessageProducer object to send messages to a destination. Since Queue and Topic both inherit from Destination, they can be used in the destination parameter to create a MessageProducer object.

Namespace:  Kaazing.JMS
Assembly:  Kaazing.JMS (in Kaazing.JMS.dll)

Syntax

Visual Basic
Function CreateProducer ( _
	destination As IDestination _
) As IMessageProducer
C#
IMessageProducer CreateProducer(
	IDestination destination
)
Visual C++
IMessageProducer^ CreateProducer(
	IDestination^ destination
)

Parameters

destination
Type: Kaazing.JMS..::..IDestination
the Destination to send to, or null if this is a producer which does not have a specified destination.

Exceptions

ExceptionCondition
Kaazing.JMS..::..JMSExceptionif the session fails to create a MessageProducer due to some internal error.
Kaazing.JMS..::..InvalidDestinationExceptionif an invalid destination is specified.

See Also