massakam opened a new pull request #11253:
URL: https://github.com/apache/pulsar/pull/11253


   ### Motivation
   
   If the subscription expiration time is set to a value greater than 0 at the 
broker level, setting 0 at the namespace level will not disable automatic 
subscription deletion.
   
   For example, suppose `subscriptionExpirationTimeMinutes=5` is written in 
`broker.conf`. This means that subscriptions to which no consumer is connected 
will be automatically deleted in 5 minutes.
   
   Now, suppose a user runs the following command to disable automatic 
subscription deletion in the namespace `tenant/ns`.
   
   ```sh
   $ ./bin/pulsar-admin namespaces set-subscription-expiration-time -t 0 
tenant/ns
   ```
   
   However, subscriptions in namespace `tenant/ns` will actually be deleted in 
5 minutes like any other namespace.
   
   ### Modifications
   
   Change the type of `subscription_expiration_time_minutes` in the namespace 
policies from `int` to `java.lang.Integer` so that it can be set to null.
   
   If `subscription_expiration_time_minutes` is 0, automatic subscription 
deletion is disabled. If it is null, the broker-level setting is used.
   
   This fix is similar to https://github.com/apache/pulsar/pull/8178.


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


Reply via email to