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/06/18 21:04:36 UTC

[GitHub] [pulsar] ocelot93 opened a new issue #10972: `subscriptionExpirationTimeMinutes` option is not working

ocelot93 opened a new issue #10972:
URL: https://github.com/apache/pulsar/issues/10972


   **Describe the bug**
   Default value for `subscriptionExpirationTimeMinutes` is `0`, which means that inactive subscriptions are not being deleted automatically. Setting this value to `1` (for example) means that subscription has to be deleted `1` minute after last consumed message (or after the time set in `subscriptionExpiryCheckIntervalInMinutes` setting)
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Spin up Pulsar in docker container
   2. Create a topic (e.g. `testTopic`)
   3. Set `subscriptionExpirationTimeMinutes` to 1 (either with `set-subscription-expiration-time` command of pulsar-admin CLI or with Pulsar Admin REST API)
   4. Subscribe for this topic and produce any message
   5. Wait until subscription is deleted automatically. It will persist forever regardless of new messages absence
   6. Active subscriptions presence can be checked with REST API request - `{pulsar address}/admin/v2/non-persistent/public/default/testTopic/stats` - it will produce a response like this:
   ```
   {
       "msgRateIn": 0.0,
       ...
       ...
       "publishers": [
           {
               ...
               "connectedSince": "2021-06-18T07:28:52.581Z",
               "producerName": "standalone-0-0",
               ...
           }
       ],
       "subscriptions": {
           "test-subscription": {
               ...
               "lastConsumedFlowTimestamp": 0,
               "lastConsumedTimestamp": 0,
               "lastAckedTimestamp": 0,
               "consumers": [
                   {
                      ...
                       "consumerName": "test-consumer",
                       ...
                       "lastAckedTimestamp": 0,
                       "lastConsumedTimestamp": 1624001451431,
                       "connectedSince": "2021-06-18T07:29:13.578Z",
                       ...
                   }
               ],
               "isDurable": false,
               "isReplicated": false,
               "msgDropRate": 0.0
           }
       },
       "replication": {},
       "msgDropRate": 0.0
   }
   ```
   
   **Expected behavior**
   Information about a subscription has to be deleted after subscription expiration time has been reached. New exclusive consumers should be able to use the same subscription name afterwards.
   
   **Screenshots**
   No screenshots.
   
   **Desktop (please complete the following information):**
    - OS: Windows 10 Pro
    - Version: 20H2
    - Docker image: apachepulsar/pulsar:2.6.0
    - Docker version: 20.10.5, build 55c4c88
    - Docker compose version: 1.17.1


-- 
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 #10972: `subscriptionExpirationTimeMinutes` option is not working

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


   The issue had no activity for 30 days, mark with Stale label.


-- 
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] hangc0276 commented on issue #10972: `subscriptionExpirationTimeMinutes` option is not working

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


   `subscriptionExpirationTimeMinutes` > 0 means how long to delete inactive subscriptions from last consuming. If the consumer still connected to the topic without consuming messages, the subscription is still active, and it won't be auto deleted.
   
   @ocelot93  Between step 4 and 5, did you close the consumer?


-- 
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] ocelot93 commented on issue #10972: `subscriptionExpirationTimeMinutes` option is not working

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


   @hangc0276 yes, I did


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