Method CreateDurableSubscription
CreateDurableSubscription(String, SubscriptionPolicy, MessageReceivedCallback, Nullable<TimeSpan>, DeliveryMode)
It creates a Durable subscription.
Declaration
IDurableTopicSubscription CreateDurableSubscription(string subscriptionName, SubscriptionPolicy subscriptionPolicy, MessageReceivedCallback messageReceivedCallback, TimeSpan? timespan = default(TimeSpan? ), DeliveryMode deliveryMode = DeliveryMode.Sync)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionName | Name of the Subscription. |
SubscriptionPolicy | subscriptionPolicy | Subscription policy whether Shared or Exclusive. |
MessageReceivedCallback | messageReceivedCallback | Message is delivered through this callback. |
System.Nullable<System.TimeSpan> | timespan | An optional paramater that determines the expiration time. |
DeliveryMode | deliveryMode | An optional parameter which specifies whether to deliver messages to register subscribers synchronously or asynchronously. Default value of this parameter is Sync. |
Returns
Type | Description |
---|---|
IDurableTopicSubscription | Definition of the subscription created. |