Subscribes to this topic. When a message is published, the given MessageListener is called.
More than one message listener can be added on one instance.
the MessageListener to add
Destroys this object cluster-wide. Clears all resources taken for this object.
Returns the unique name of this object.
Returns the key of the partition that this DistributedObject is assigned to.
For a partitioned data structure, the returned value will not be
Returns the service name for this object.
Publishes the message to all subscribers of this topic.
the message to publish to all subscribers of this topic
Stops receiving messages for the given message listener.
If the given listener already removed, this method does nothing.
listener registration ID
true if registration is removed,
Generated using TypeDoc
Hazelcast provides distribution mechanism for publishing messages that are delivered to multiple subscribers, which is also known as a publish/subscribe (pub/sub) messaging model. Publish and subscriptions are cluster-wide.
This interface stand for reliable topic, i.e. it uses a Ringbuffer to store events. The events in the Ringbuffer are replicated, so they won't get lost when a node goes down.
Methods that require serialization/deserialization may throw RangeError, e.g when there is no suitable serializer for a certain type. Also they may throw HazelcastSerializationError if a compact object is cannot be deserialized due to unknown schema.