exports.Topic

exports.Topic

Topic is a class representing a logical communication channel.

Constructor

new exports.Topic(name, callbacksopt)

Create topic.
Source:
Parameters:
Name Type Attributes Description
name string Name of the topic to create.
callbacks Object <optional>
Object with various event callbacks.
Name Type Description
onData onData Callback which receives a {data} message.
onMeta callback Callback which receives a {meta} message.
onPres callback Callback which receives a {pres} message.
onInfo callback Callback which receives an {info} message.
onMetaDesc callback Callback which receives changes to topic desctioption desc.
onMetaSub callback Called for a single subscription record change.
onSubsUpdated callback Called after a batch of subscription changes have been recieved and cached.
onDeleteTopic callback Called after the topic is deleted.
callbacls.onAllMessagesReceived callback Called when all requested {data} messages have been recived.