Topic

Topic

The Topic facilitates creating subscription and publishing of messages against the topic. This also provides event registrations for message delivery failure, receiving messages and deleting topics.


Constructor

# new Topic()

Methods

# (async) addMessageDeliveryFailureListener(messageFailedEventListener)

Parameters:
Name Type Description
messageFailedEventListener TopicListener

# (async) addTopicDeletedListener(deleteEventListener)

Parameters:
Name Type Description
deleteEventListener TopicListener

# (async) createDurableSubscription(subscriptionName, subscriptionPolicy, messageReceivedListener, timespan, deliveryMode) → {DurableTopicSubscription}

Parameters:
Name Type Description
subscriptionName string
subscriptionPolicy SubscriptionPolicy
messageReceivedListener MessageReceivedListener
timespan TimeSpan
deliveryMode DeliveryMode
Returns:
Type
DurableTopicSubscription

# (async) createSubscription(messageReceivedEventListener, deliveryMode) → {TopicSubscription}

Parameters:
Name Type Description
messageReceivedEventListener MessageReceivedListener
deliveryMode DeliveryMode
Returns:
Type
TopicSubscription

# getIsClosed() → {boolean}

Returns:
Type
boolean

# getMessageCount() → {number}

Returns:
Type
number

# getName() → {string}

Returns:
Type
string

# getPriority() → {TopicPriority}

Returns:
Type
TopicPriority

# getSearchOptions() → {TopicSearchOptions}

Returns:
Type
TopicSearchOptions

# (async) publish(message, deliverOption, sequenceName, notifyDeliveryFailure)

Parameters:
Name Type Default Description
message Message
deliverOption DeliveryOption
sequenceName string null
notifyDeliveryFailure boolean false

# (async) publishBulk(messages, notifyDeliveryFailure)

Parameters:
Name Type Default Description
messages Map.<Message, DeliveryOption>
notifyDeliveryFailure boolean false

# (async) removeTopicDeletedListener()

Remove the listener

# (async) setExpirationTime(value)

Parameters:
Name Type Description
value TimeSpan