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

A client uses a IMessageConsumer object to receive messages that have been sent to a destination.

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

Syntax

Visual Basic
Function CreateConsumer ( _
	destination As IDestination, _
	messageSelector As String _
) As IMessageConsumer
C#
IMessageConsumer CreateConsumer(
	IDestination destination,
	string messageSelector
)
Visual C++
IMessageConsumer^ CreateConsumer(
	IDestination^ destination, 
	String^ messageSelector
)

Parameters

destination
Type: Kaazing.JMS..::..IDestination
the IDestination to access
messageSelector
Type: System..::..String
only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.

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.
Kaazing.JMS..::..InvalidSelectorExceptionif the message selector is invalid.

See Also