Class SubscriptionDescription
- Namespace
- Microsoft.Azure.ServiceBus.Management
- Assembly
- Microsoft.Azure.ServiceBus.dll
Represents the metadata description of the subscription.
public class SubscriptionDescription : IEquatable<SubscriptionDescription>
- Inheritance
-
SubscriptionDescription
- Implements
- Inherited Members
Constructors
SubscriptionDescription(string, string)
Initializes a new instance of SubscriptionDescription class with the specified name and topic path.
public SubscriptionDescription(string topicPath, string subscriptionName)
Parameters
topicPath
stringPath of the topic relative to the namespace base address.
subscriptionName
stringName of the subscription.
Properties
AutoDeleteOnIdle
The TimeSpan idle interval after which the subscription is automatically deleted.
public TimeSpan AutoDeleteOnIdle { get; set; }
Property Value
Remarks
The minimum duration is 5 minutes. Default value is MaxValue.
DefaultMessageTimeToLive
The default time to live value for the messages. This is the duration after which the message expires, starting from when the message is sent to Service Bus.
public TimeSpan DefaultMessageTimeToLive { get; set; }
Property Value
Remarks
This is the default value used when TimeToLive is not set on a message itself. Messages older than their TimeToLive value will expire and no longer be retained in the message store. Subscribers will be unable to receive expired messages. Default value is MaxValue.
EnableBatchedOperations
Indicates whether server-side batched operations are enabled.
public bool EnableBatchedOperations { get; set; }
Property Value
Remarks
Defaults to true.
EnableDeadLetteringOnFilterEvaluationExceptions
indicates whether messages need to be forwarded to dead-letter sub queue when subscription rule evaluation fails.
public bool EnableDeadLetteringOnFilterEvaluationExceptions { get; set; }
Property Value
Remarks
Defaults to true.
EnableDeadLetteringOnMessageExpiration
Indicates whether this subscription has dead letter support when a message expires.
public bool EnableDeadLetteringOnMessageExpiration { get; set; }
Property Value
Remarks
If true, the expired messages are moved to dead-letter sub-queue. Default value is false.
ForwardDeadLetteredMessagesTo
The path of the recipient entity to which all the dead-lettered messages of this subscription are forwarded to.
public string ForwardDeadLetteredMessagesTo { get; set; }
Property Value
Remarks
If set, user cannot manually receive dead-lettered messages from this subscription. The destination entity must already exist.
ForwardTo
The path of the recipient entity to which all the messages sent to the subscription are forwarded to.
public string ForwardTo { get; set; }
Property Value
Remarks
If set, user cannot manually receive messages from this subscription. The destination entity must be an already existing entity.
LockDuration
Duration of a peek lock receive. i.e., the amount of time that the message is locked by a given receiver so that no other receiver receives the same message.
public TimeSpan LockDuration { get; set; }
Property Value
Remarks
Max value is 5 minutes. Default value is 60 seconds.
MaxDeliveryCount
The maximum delivery count of a message before it is dead-lettered.
public int MaxDeliveryCount { get; set; }
Property Value
Remarks
The delivery count is increased when a message is received in PeekLock mode and didn't complete the message before the message lock expired. Default value is 10. Minimum value is 1.
RequiresSession
This indicates whether the subscription supports the concept of session. Sessionful-messages follow FIFO ordering.
public bool RequiresSession { get; set; }
Property Value
Remarks
If true, the receiver can only recieve messages using AcceptMessageSessionAsync(). Defaults to false.
Status
The current status of the subscription (Enabled / Disabled).
public EntityStatus Status { get; set; }
Property Value
Remarks
When an entity is disabled, that entity cannot send or receive messages.
SubscriptionName
Name of the subscription.
public string SubscriptionName { get; set; }
Property Value
Remarks
Value cannot be null or empty. Value cannot exceed 50 chars. Cannot have restricted characters: '@','?','#','*','/',''
TopicPath
Path of the topic under which subscription exists.
public string TopicPath { get; set; }
Property Value
Remarks
Value cannot be null or empty. Value cannot exceed 260 chars. Cannot start or end with a slash. Cannot have restricted characters: '@','?','#','*'
UserMetadata
Custom metdata that user can associate with the description.
public string UserMetadata { get; set; }
Property Value
Remarks
Cannot be null. Max length is 1024 chars.
Methods
Equals(SubscriptionDescription)
public bool Equals(SubscriptionDescription otherDescription)
Parameters
otherDescription
SubscriptionDescription
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Operators
operator ==(SubscriptionDescription, SubscriptionDescription)
public static bool operator ==(SubscriptionDescription o1, SubscriptionDescription o2)
Parameters
Returns
operator !=(SubscriptionDescription, SubscriptionDescription)
public static bool operator !=(SubscriptionDescription o1, SubscriptionDescription o2)