Creates a MessageConsumer for the specified destination. Since Queue and Topic both inherit from Destination, they can be used in the destination parameter to create a MessageConsumer.

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

Syntax

Visual Basic
Function CreateConsumer ( _
	destination As IDestination _
) As IMessageConsumer
C#
IMessageConsumer CreateConsumer(
	IDestination destination
)
Visual C++
IMessageConsumer^ CreateConsumer(
	IDestination^ destination
)

Parameters

destination
Type: Kaazing.JMS..::..IDestination
the Destination to access.

Exceptions

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

See Also