Method CreateTopic
CreateTopic(String)
Creates a topic with the specified name.
Declaration
ITopic CreateTopic(string topicName)
Parameters
Type | Name | Description |
---|---|---|
System.String | topicName |
Returns
Type | Description |
---|---|
ITopic | Returns the created topic instance |
Examples
The following example demonstrates how to create a topic.
First initialize cache.
Cache cache = NCache.InitializeCache("myCache");
Then get messaging service from cache.
IMessagingService messagingService=cache.MessagingService;
Then create topic on messagingService
ITopic topic=messagingService.CreateTopic("mytopic");