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.
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public interface ITopic : IDisposable
Properties
Name | Description |
---|---|
ExpirationTime | Default Expiry time of messsage for this topic. Its default value is TimeSpan.MaxValue. |
IsClosed | Is topic closed or not? |
MessageCount | Number of messages published for this topic. |
Name | Topic's name |
OnTopicDeleted | Topic deletion events are delivered through this callback. |
Priority | The relative priority of the topic. |
SearchOptions | Returns whether user has subscribed to Pattern based or simple subscription |
Methods
Name | Description |
---|---|
CreateDurableSubscription(String, SubscriptionPolicy, MessageReceivedCallback, Nullable<TimeSpan>, DeliveryMode) | Creates a Durable subscription |
CreateSubscription(MessageReceivedCallback, DeliveryMode) | This method is used to register against topic on cache if topic exists, otherwise throw exception. |
Publish(Message, DeliveryOption, Boolean) | This method is used to Publish the message in the cache with 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 specified DeliveryOption and SequenceName. Order of messages with 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 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) | This method is used to Publish messages in bulk in the cache with specified DeliveryOption. And the option to notify the publisher if the message has failed to deliver because of expiration, eviction or internal system issue. |
Events
Name | Description |
---|---|
MessageDeliveryFailure | Subscribe for Message delivery failure events |