Table of Contents

Class TopicDescription

Namespace
Microsoft.Azure.ServiceBus.Management
Assembly
Microsoft.Azure.ServiceBus.dll

Represents the metadata description of the topic.

public class TopicDescription : IEquatable<TopicDescription>
Inheritance
TopicDescription
Implements
Inherited Members

Constructors

TopicDescription(string)

Initializes a new instance of TopicDescription class with the specified relative path.

public TopicDescription(string path)

Parameters

path string

Path of the topic relative to the namespace base address.

Properties

AuthorizationRules

The AuthorizationRules on the topic to control user access at entity level.

public AuthorizationRules AuthorizationRules { get; }

Property Value

AuthorizationRules

AutoDeleteOnIdle

The TimeSpan idle interval after which the topic is automatically deleted.

public TimeSpan AutoDeleteOnIdle { get; set; }

Property Value

TimeSpan

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

TimeSpan

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.

DuplicateDetectionHistoryTimeWindow

The TimeSpan duration of duplicate detection history that is maintained by the service.

public TimeSpan DuplicateDetectionHistoryTimeWindow { get; set; }

Property Value

TimeSpan

Remarks

The default value is 1 minute. Max value is 7 days and minimum is 20 seconds.

EnableBatchedOperations

Indicates whether server-side batched operations are enabled.

public bool EnableBatchedOperations { get; set; }

Property Value

bool

Remarks

Defaults to true.

EnablePartitioning

Indicates whether the topic is to be partitioned across multiple message brokers.

public bool EnablePartitioning { get; set; }

Property Value

bool

Remarks

Defaults to false.

MaxSizeInMB

The maximum size of the topic in megabytes, which is the size of memory allocated for the topic.

public long MaxSizeInMB { get; set; }

Property Value

long

Remarks

Default value is 1024.

Path

Path of the topic relative to the namespace base address.

public string Path { get; set; }

Property Value

string

Remarks

Max length is 260 chars. Cannot start or end with a slash. Cannot have restricted characters: '@','?','#','*'

RequiresDuplicateDetection

This value indicates if the topic requires guard against duplicate messages. If true, duplicate messages having same MessageId and sent to topic within duration of DuplicateDetectionHistoryTimeWindow will be discarded.

public bool RequiresDuplicateDetection { get; set; }

Property Value

bool

Remarks

Defaults to false.

Status

The current status of the topic (Enabled / Disabled).

public EntityStatus Status { get; set; }

Property Value

EntityStatus

Remarks

When an entity is disabled, that entity cannot send or receive messages.

SupportOrdering

Defines whether ordering needs to be maintained. If true, messages sent to topic will be forwarded to the subscription in order.

public bool SupportOrdering { get; set; }

Property Value

bool

Remarks

Defaults to false.

UserMetadata

Custom metdata that user can associate with the description.

public string UserMetadata { get; set; }

Property Value

string

Remarks

Cannot be null. Max length is 1024 chars.

Methods

Equals(TopicDescription)

public bool Equals(TopicDescription otherDescription)

Parameters

otherDescription TopicDescription

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(TopicDescription, TopicDescription)

public static bool operator ==(TopicDescription o1, TopicDescription o2)

Parameters

o1 TopicDescription
o2 TopicDescription

Returns

bool

operator !=(TopicDescription, TopicDescription)

public static bool operator !=(TopicDescription o1, TopicDescription o2)

Parameters

o1 TopicDescription
o2 TopicDescription

Returns

bool