ITopicT InterfaceHazelcast .Net Client Class Library
Hazelcast provides distribution mechanism for publishing messages that are delivered to multiple subscribers which is also known as publish/subscribe (pub/sub) messaging model.

Namespace: Hazelcast.Core
Assembly: Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.8.2
Syntax

public interface ITopic<T> : IDistributedObject

Type Parameters

T

The ITopicT type exposes the following members.

Methods

  NameDescription
Public methodAddMessageListener(IMessageListenerT)
Subscribes to this topic.
Public methodAddMessageListener(ActionMessageT)
Subscribes to this topic.
Public methodDestroy
Destroys this object cluster-wide.
(Inherited from IDistributedObject.)
Public methodGetName
Returns the name of this ITopic instance
Public methodGetPartitionKey
Returns the key of partition this IDistributedObject is assigned to.
(Inherited from IDistributedObject.)
Public methodGetServiceName
Returns the service name for this object.
(Inherited from IDistributedObject.)
Public methodPublish
Publishes the message to all subscribers of this topic
Public methodRemoveMessageListener
Stops receiving messages for the given message listener.
Top
Remarks

Hazelcast provides distribution mechanism for publishing messages that are delivered to multiple subscribers which is also known as publish/subscribe (pub/sub) messaging model. Publish and subscriptions are cluster-wide. When a member subscribes for a topic, it is actually registering for messages published by any member in the cluster, including the new members joined after you added the listener.

Messages are ordered, meaning, listeners(subscribers) will process the messages in the order they are actually published. If cluster member M publishes messages m1, m2, m3...mn to a topic T, then Hazelcast makes sure that all of the subscribers of topic T will receive and process m1, m2, m3...mn in order.
See Also

Reference