ManagementClient.createTopic 方法

定义

重载

createTopic(String topicPath)

Creates a new topic in the service namespace with the given name. See TopicDescription for default values of topic properties.

createTopic(TopicDescription topicDescription)

Creates a new topic in the service namespace with the given name. See TopicDescription for default values of topic properties.

createTopic(String topicPath)

Creates a new topic in the service namespace with the given name. See TopicDescription for default values of topic properties.

public TopicDescription createTopic(String topicPath)

参数

topicPath
String

- The name of the topic relative to the service namespace base address.

返回

TopicDescription of the newly created topic.

例外

IllegalArgumentException

- Entity name is null, empty, too long or uses illegal characters.

MessagingEntityAlreadyExistsException

- An entity with the same name exists under the same service namespace.

TimeoutException

- The operation times out. The timeout period is initiated through ClientSettings.operationTimeout

AuthorizationFailedException

- No sufficient permission to perform this operation. Please check ClientSettings.tokenProvider has correct details.

ServerBusyException

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

ServiceBusException

- An internal error or an unexpected exception occurred.

QuotaExceededException

- Either the specified size in the description is not supported or the maximum allowed quota has been reached.

InterruptedException

if the current thread was interrupted

createTopic(TopicDescription topicDescription)

Creates a new topic in the service namespace with the given name. See TopicDescription for default values of topic properties.

public TopicDescription createTopic(TopicDescription topicDescription)

参数

topicDescription
TopicDescription

- A QueueDescription object describing the attributes with which the new topic will be created.

返回

TopicDescription of the newly created topic.

例外

MessagingEntityAlreadyExistsException

- An entity with the same name exists under the same service namespace.

TimeoutException

- The operation times out. The timeout period is initiated through ClientSettings.operationTimeout

AuthorizationFailedException

- No sufficient permission to perform this operation. Please check ClientSettings.tokenProvider has correct details.

ServerBusyException

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

ServiceBusException

- An internal error or an unexpected exception occurred.

QuotaExceededException

- Either the specified size in the description is not supported or the maximum allowed quota has been reached.

InterruptedException

if the current thread was interrupted

适用于