Creates a nondurable subscriber to the specified topic, using a message selector or specifying whether messages published by its own connection should be delivered to it.

A client uses a TopicSubscriber object to receive messages that have been published to a topic.

Regular TopicSubscriber objects are not durable. They receive only messages that are published while they are active.

Messages filtered out by a subscriber's message selector will never be delivered to the subscriber. From the subscriber's perspective, they do not exist.

In some cases, a connection may both publish and subscribe to a topic. The subscriber NoLocal attribute allows a subscriber to inhibit the delivery of messages published by its own connection. The default value for this attribute is false.

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

Syntax

Visual Basic
Function CreateSubscriber ( _
	topic As ITopic, _
	messageSelector As String, _
	noLocal As Boolean _
) As ITopicSubscriber
C#
ITopicSubscriber CreateSubscriber(
	ITopic topic,
	string messageSelector,
	bool noLocal
)
Visual C++
ITopicSubscriber^ CreateSubscriber(
	ITopic^ topic, 
	String^ messageSelector, 
	bool noLocal
)

Parameters

topic
Type: Kaazing.JMS..::..ITopic
the Topic to subscribe to
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.
noLocal
Type: System..::..Boolean
if set, inhibits the delivery of messages published by its own connection

Exceptions

ExceptionCondition
Kaazing.JMS..::..JMSExceptionif the session fails to create a subscriber due to some internal error.
Kaazing.JMS..::..InvalidDestinationExceptionif an invalid topic is specified.
Kaazing.JMS..::..InvalidSelectorExceptionif the message selector is invalid.

See Also