Unsubscribe subscription [Rest API] working? #17379
|
I tried unsubscribing a subscription on a topic via the rest api as indicated here: But it didn't work and the response I got was along the lines of "not found". I then tried the following to unsubscribe a subscription on a whole namespace and this worked for me, but the above didn't. I was just wondering if anyone could confirm for me that this works to unsubscribe a subscription on a single topic. I'm running ~ Pulsar version 2.7.2 Thanks |
Replies: 3 comments 3 replies
|
Are you able to provide the exact error you observed? Were you using the rest api or the Pulsar Admin CLI? Also, can you confirm that the subscription exists on the topic by calling |
|
Thank you for your response. I am using the rest api, here is a sample of the end point: "DELETE" request to: Result: Running: pulsar-admin topics stats persistent://test/ingest/test show the subscription still active. What works: "Post" request to Result: Running: pulsar-admin topics stats persistent://test/ingest/test shows the subscription has been successfully removed. |
|
It looks like that documentation is incorrect. I also get a 404 when I call that endpoint. However, when I run
The correct endpoint includes Would you mind creating an issue in the project to get the documentation fixed? Thanks! |
It looks like that documentation is incorrect. I also get a 404 when I call that endpoint. However, when I run
bin/pulsar-admin topics unsubscribe -s sub test, I noticed that the broker logs a different endpoint:The correct endpoint includes
/persistent. If you try/admin/v2/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}, it should work.Would you mind creating an issue in the project to get the documentation fixed? Thanks!