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.
返回
例外
- Entity name is null, empty, too long or uses illegal characters.
- An entity with the same name exists under the same service namespace.
- The operation times out. The timeout period is initiated through ClientSettings.operationTimeout
- No sufficient permission to perform this operation. Please check ClientSettings.tokenProvider has correct details.
- The server is busy. You should wait before you retry the operation.
- An internal error or an unexpected exception occurred.
- Either the specified size in the description is not supported or the maximum allowed quota has been reached.
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.
返回
例外
- An entity with the same name exists under the same service namespace.
- The operation times out. The timeout period is initiated through ClientSettings.operationTimeout
- No sufficient permission to perform this operation. Please check ClientSettings.tokenProvider has correct details.
- The server is busy. You should wait before you retry the operation.
- An internal error or an unexpected exception occurred.
- Either the specified size in the description is not supported or the maximum allowed quota has been reached.
if the current thread was interrupted