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. |
subscriptionName | Name of the Subscription. |
Subscription |
subscriptionPolicy | Subscription policy whether Shared or Exclusive. |
Message |
messageReceivedCallback | Message is delivered through this callback. |
System. |
timespan | An optional paramater that determines the expiration time. |
Delivery |
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 |
---|---|
IDurable |
Definition of the subscription created. |