You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/04 09:12:57 UTC

[GitHub] [pulsar] munir131 opened a new issue #9477: Force delete subscription is not working

munir131 opened a new issue #9477:
URL: https://github.com/apache/pulsar/issues/9477


   **Describe the bug**
   There is provision in admin API to force delete subscription. But, when I am passing ***force=true*** in querystring I am getting response with a 204 status code. But, when checking the subscription list, that subscription is still there.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Run pulsar
   2. Create producer & consumer on that topic. Here I used pulsar-client-go 2.3.0
   3. Now call Delete subscription. e.g `localhost:8080/admin/v2/persistent/public/default/topic-1/subscription/my-subscription-name?force=true`
   4. Now check using call to list subscription. e.g `localhost:8080/admin/v2/persistent/public/default/topic-1/subscriptions`
   
   **Expected behavior**
   It should delete subscription or return error instead of 204 status code in case of error
   
   **Screenshots**
   ![delete-subscription](https://user-images.githubusercontent.com/6319375/106870498-31990800-66f7-11eb-83de-0bbf8c673d3d.png)
   ![get-subscriptions](https://user-images.githubusercontent.com/6319375/106870500-32319e80-66f7-11eb-905b-ddee35ab4fd5.png)
   
   
   **Desktop (please complete the following information):**
    - OS: NA - Official docker image
   
   **Additional context**
   Pulsar version: 2.7.0
   Env: Docker
   Type: Standalone
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #9477:
URL: https://github.com/apache/pulsar/issues/9477#issuecomment-775641098


   @munir131 Have you closed all the consumers under the subscription? By default, the subscription will be  created automatically when the active consumer reconnects to the broker.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] munir131 commented on issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
munir131 commented on issue #9477:
URL: https://github.com/apache/pulsar/issues/9477#issuecomment-779152556


   @codelipenghui No. I haven't closed all the consumers. Consumers can be run on many systems which are not accessible sometime. Doesn't control should be in pulsar server?
   You mentioned that 
   ```By default, the subscription will be created automatically when the active consumer reconnects to the broker.```
   
   Doesn't consumer have to reauthenticate for create consumer. I already removed all permissions then how consumer can create new subscription?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] munir131 commented on issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
munir131 commented on issue #9477:
URL: https://github.com/apache/pulsar/issues/9477#issuecomment-773815035


   @xxxxpenny I already removed all permissions from that topic. So, consumer must not be resubscribed. If I am restarting consumer then I am getting an error that your token is unauthorized. Same thing is happening when I have an active producer and try to force delete the topic. 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] munir131 edited a comment on issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
munir131 edited a comment on issue #9477:
URL: https://github.com/apache/pulsar/issues/9477#issuecomment-924655123


   @codelipenghui Thanks for the quick responses. I verified that on 2.7.3 and it is working perfectly now.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui edited a comment on issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
codelipenghui edited a comment on issue #9477:
URL: https://github.com/apache/pulsar/issues/9477#issuecomment-788956229


   @munir131 Interesting, you can check the topic stats through the pulsar-admin  `bin/pulsar-admin topics stats`, so that you can get the `connectedSince` of the consumer. this can help to determine if the consumer reconnects to the broker.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] xxxxpenny commented on issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
xxxxpenny commented on issue #9477:
URL: https://github.com/apache/pulsar/issues/9477#issuecomment-773294549


   If you always run the consumer and use the API to force unsubscribe, the consumer will resubscribe. Maybe this is the reason for this problem? This problem is reproduced using the python client
   This is python consumer log
   ```
   2021-02-04 21:12:53.678 INFO  [0x70000ae31000] ConsumerImpl:864 | Broker notification of Closed consumer: 0
   2021-02-04 21:12:53.678 INFO  [0x70000ae31000] HandlerBase:131 | [persistent://public/default/my-topic, my-sub, 0] Schedule reconnection in 0.1 s
   2021-02-04 21:12:53.782 INFO  [0x70000ae31000] HandlerBase:54 | [persistent://public/default/my-topic, my-sub, 0] Getting connection from pool
   2021-02-04 21:12:53.843 INFO  [0x70000ae31000] ConsumerImpl:214 | [persistent://public/default/my-topic, my-sub, 0] Created consumer on broker [[::1]:65521 -> [::1]:6650]
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #9477:
URL: https://github.com/apache/pulsar/issues/9477#issuecomment-788956229


   Interesting, you can check the topic stats through the pulsar-admin  `bin/pulsar-admin topics stats`, so that you can get the `connectedSince` of the consumer. this can help to determine if the consumer reconnects to the broker.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] munir131 commented on issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
munir131 commented on issue #9477:
URL: https://github.com/apache/pulsar/issues/9477#issuecomment-924655123


   @codelipenghui Thanks for the quick responses. I verified that 2.7.3 and it is working perfectly now.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] xxxxpenny commented on issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
xxxxpenny commented on issue #9477:
URL: https://github.com/apache/pulsar/issues/9477#issuecomment-773294549


   If you always run the consumer and use the API to force unsubscribe, the consumer will resubscribe. Maybe this is the reason for this problem? This problem is reproduced using the python client
   This is python consumer log
   ```
   2021-02-04 21:12:53.678 INFO  [0x70000ae31000] ConsumerImpl:864 | Broker notification of Closed consumer: 0
   2021-02-04 21:12:53.678 INFO  [0x70000ae31000] HandlerBase:131 | [persistent://public/default/my-topic, my-sub, 0] Schedule reconnection in 0.1 s
   2021-02-04 21:12:53.782 INFO  [0x70000ae31000] HandlerBase:54 | [persistent://public/default/my-topic, my-sub, 0] Getting connection from pool
   2021-02-04 21:12:53.843 INFO  [0x70000ae31000] ConsumerImpl:214 | [persistent://public/default/my-topic, my-sub, 0] Created consumer on broker [[::1]:65521 -> [::1]:6650]
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] munir131 commented on issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
munir131 commented on issue #9477:
URL: https://github.com/apache/pulsar/issues/9477#issuecomment-773815035


   @xxxxpenny I already removed all permissions from that topic. So, consumer must not be resubscribed. If I am restarting consumer then I am getting an error that your token is unauthorized. Same thing is happening when I have an active producer and try to force delete the topic. 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] munir131 closed issue #9477: Force delete subscription is not working

Posted by GitBox <gi...@apache.org>.
munir131 closed issue #9477:
URL: https://github.com/apache/pulsar/issues/9477


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org