Deletes a specified topic.
Operation description
If you delete the topic, the publishing and subscription relationships that are established based on the topic are cleared. Exercise caution when you call this operation.
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 belongs. |
rmq-cn-7e22ody**** |
| topicName |
string |
Yes |
The name of the topic. |
topic_test |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| requestId |
string |
The ID of the request. The system generates a unique ID for each request. You can troubleshoot issues based on the request ID. |
AF9A8B10-C426-530F-A0DD-96320B39**** |
| success |
boolean |
Indicates whether the call is successful. |
true |
| data |
boolean |
The result data that is returned. |
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.