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.
Destroys this object cluster-wide.
Clears all resources taken for this object.
Returns Promise<void>
getName
getName(): string
Returns the unique name of this object.
Returns string
getPartitionKey
getPartitionKey(): string
Returns the key of the partition that this DistributedObject is assigned to.
For a partitioned data structure, the returned value will not be null,
but otherwise undefined.
Returns string
getServiceName
getServiceName(): string
Returns the service name for this object.
Returns string
publish
publish(message: E): Promise<void>
Publishes the message to all subscribers of this topic.
Parameters
message: E
the message to publish to all subscribers of this topic
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.