Deletes a specified topic.
Operation description
Deleting a topic clears all publish-subscribe relationships under the topic. Call this operation with caution.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rocketmq:DeleteTopic |
delete |
*Topic
|
None | None |
Request syntax
DELETE /instances/{instanceId}/topics/{topicName} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The ID of the instance to which the topic to be deleted belongs. |
rmq-cn-7e22ody**** |
| topicName |
string |
Yes |
The name of the topic to be deleted. |
topic_test |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Result |
||
| requestId |
string |
The request ID. Each request ID is unique and can be used to troubleshoot and locate issues. |
AF9A8B10-C426-530F-A0DD-96320B39**** |
| success |
boolean |
Indicates whether the execution was successful. |
true |
| data |
boolean |
The returned result. |
true |
| code |
string |
The error code. |
Topic.NotFound |
| message |
string |
The error message. |
The topic cannot be found. |
| httpStatusCode |
integer |
The HTTP status code. |
400 |
| dynamicCode |
string |
The dynamic error code. |
TopicName |
| dynamicMessage |
string |
The dynamic error message. |
topicName |
Examples
Success response
JSON format
{
"requestId": "AF9A8B10-C426-530F-A0DD-96320B39****",
"success": true,
"data": true,
"code": "Topic.NotFound",
"message": "The topic cannot be found.",
"httpStatusCode": 400,
"dynamicCode": "TopicName",
"dynamicMessage": "topicName"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.