Interface ITopic
The ITopic interface facilitates creating subscription and publishing of messages against the topic. This also provides event registrations for message delivery failure, receiving messages and deleting topics.
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public interface ITopic : IDisposable
Properties
Name | Description |
---|---|
ExpirationTime | The default expiry time of messsage for the topic. Its default value is TimeSpan.MaxValue. |
IsClosed | This property specifies whether the topic is closed or not? |
MessageCount | Number of messages published for this topic. |
Name | Specifies the topic's name. |
OnTopicDeleted | Topic deletion events are delivered through this callback. |
Priority | Defines the relative priority of the topic. |
SearchOptions | Returns whether the user has subscribed to the pattern based or the simple subscription. |
Methods
Name | Description |
---|---|
CreateDurableSubscription(String, SubscriptionPolicy, MessageReceivedCallback, Nullable<TimeSpan>, DeliveryMode) | It creates a Durable subscription. |
CreateSubscription(MessageReceivedCallback, DeliveryMode) | This method is used to register against a topic on the cache if a topic exists, otherwise throws exception. |
Publish(Message, DeliveryOption, Boolean) | This method is used to publish the message in the cache with the specified DeliveryOption. And the option to notify the publisher if the message has failed to deliver because of expiration, eviction or internal system issue. |
Publish(Message, DeliveryOption, String, Boolean) | This method is used to publish the message in the cache with the specified DeliveryOption and the SequenceName. The order of messages with the same sequence name is retained. And the option to notify the publisher if the message has failed to deliver because of expiration, eviction or internal system issue. |
PublishAsync(Message, DeliveryOption, Boolean) | This method is used to publish a message asynchronously in the cache with the specified DeliveryOption and the option to notify the publisher if the message has failed to deliver because of expiration, eviction or internal system issue. |
PublishBulk(IEnumerable<Tuple<Message, DeliveryOption>>, Boolean) |
Events
Name | Description |
---|---|
MessageDeliveryFailure | Subscribes for message delivery failure events. |