horizonzy commented on code in PR #16590:
URL: https://github.com/apache/pulsar/pull/16590#discussion_r947003565
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java:
##########
@@ -1079,6 +1080,34 @@ public void deleteTopic(
});
}
+ @POST
+ @Path("/{tenant}/{namespace}/{topic}/ledger/delete")
+ @ApiOperation(value = "Delete a topic.",
+ notes = "The topic cannot be deleted if delete is not forcefully
and there's any active "
+ + "subscription or producer connected to the it. "
+ + "Force delete ignores connected clients and deletes
topic by explicitly closing them.")
+ @ApiResponses(value = {
+ @ApiResponse(code = 307, message = "Current broker doesn't serve
the namespace of this topic"),
+ @ApiResponse(code = 401, message = "Don't have permission to
administrate resources on this tenant"),
+ @ApiResponse(code = 403, message = "Don't have admin permission"),
+ @ApiResponse(code = 404, message = "Topic does not exist"),
+ @ApiResponse(code = 412, message = "Topic has active
producers/subscriptions"),
+ @ApiResponse(code = 500, message = "Internal server error")})
+ public void deleteLedger(
Review Comment:
If there are 2 brokers, it will exists two system topic consumers(A and B).
If the topic onwership is A, when B received pending delete ledger msg, it will
send delete ledger command to A. So introduce rest api in server side and
PusarAdmin.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]