![](../icons/Hazelcast-IMDG-Logo-Orange_Dark_200px.jpg) | ITopicTAddMessageListener Method (IMessageListenerT) |
Subscribes to this topic.
Namespace:
Hazelcast.Core
Assembly:
Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.9.4
Syntaxstring AddMessageListener(
IMessageListener<T> listener
)
Function AddMessageListener (
listener As IMessageListener(Of T)
) As String
String^ AddMessageListener(
IMessageListener<T>^ listener
)
abstract AddMessageListener :
listener : IMessageListener<'T> -> string
Parameters
- listener
- Type: Hazelcast.CoreIMessageListenerT
Return Value
Type:
Stringreturns registration id.
Remarks
Subscribes to this topic. When someone publishes a message on this topic.
onMessage() function of the given IMessageListener is called. More than one message listener can be
added on one instance.
See Also