[TIBCO.EMS .NET client library 5.1 documentation]

Create MessageConsumer for the specified destination, using a message selector. This method can specify whether messages published by its own connection should be delivered to it, if the destination is a topic

Namespace:  TIBCO.EMS
Assembly:  TIBCO.EMS (in TIBCO.EMS.dll)

Syntax

public MessageConsumer CreateConsumer(
	Destination dest,
	string messageSelector,
	bool noLocal
)
Public Function CreateConsumer ( _
	dest As Destination, _
	messageSelector As String, _
	noLocal As Boolean _
) As MessageConsumer
public:
MessageConsumer^ CreateConsumer(
	Destination^ dest, 
	String^ messageSelector, 
	bool noLocal
)

Parameters

dest
Type: TIBCO.EMS..::.Destination
The Destination 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 the message consumer is to receive all messages.
noLocal
Type: System..::.Boolean
When true, the server filters messages so the consumer does not receive messages that originate locally -- that is, messages sent through the same connection.

When absent or false, the consumer receives messages with local origin.

Remarks

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

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

Exceptions

ExceptionCondition
TIBCO.EMS..::.EMSExceptionIf the session fails to create a consumer due to some internal error.
TIBCO.EMS..::.InvalidDestinationExceptionIf an invalid destination is specified.
TIBCO.EMS..::.InvalidSelectorExceptionIf the message selector is invalid.

See Also