ManagementClient.TopicExistsAsync(String, CancellationToken) Method

Definition

Checks whether a given topic exists or not.

public virtual System.Threading.Tasks.Task<bool> TopicExistsAsync (string topicPath, System.Threading.CancellationToken cancellationToken = default);
abstract member TopicExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.TopicExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function TopicExistsAsync (topicPath As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

topicPath
String

Path of the topic entity to check.

cancellationToken
CancellationToken

Returns

True if topic exists, false otherwise.

Exceptions

topic path provided is not valid.

The operation times out.

No sufficient permission to perform this operation. You should check to ensure that your ManagementClient has the correct TokenProvider credentials to perform this operation.

The server is busy. You should wait before you retry the operation.

An internal error or unexpected exception occurs.

Applies to