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 2020/06/29 01:51:05 UTC

[GitHub] [pulsar] sijie commented on issue #7372: Messages on topic are deleted on restart of standalone cluster

sijie commented on issue #7372:
URL: https://github.com/apache/pulsar/issues/7372#issuecomment-650860281


   @ErikJansenIRefact 
   
   By default, Pulsar doesn't configure any retention and `brokerDeleteInactiveTopicsEnabled` is enabled by default. So if a topic doesn't have any subscriptions and doesn't configure any retention period, the topic will be garbage collected by Pulsar broker due to its inactivity.  The behavior has been documented in https://pulsar.apache.org/docs/en/2.6.0/admin-api-partitioned-topics/#create.
   
   You can check the following settings:
   
   ```
   # Enable the deletion of inactive topics
   brokerDeleteInactiveTopicsEnabled=true
   
   # How often to check for inactive topics
   brokerDeleteInactiveTopicsFrequencySeconds=60
   
   # Set the inactive topic delete mode. Default is delete_when_no_subscriptions
   # 'delete_when_no_subscriptions' mode only delete the topic which has no subscriptions and no active producers
   # 'delete_when_subscriptions_caught_up' mode only delete the topic that all subscriptions has no backlogs(caught up)
   # and no active producers/consumers
   brokerDeleteInactiveTopicsMode=delete_when_no_subscriptions
   
   # Max duration of topic inactivity in seconds, default is not present
   # If not present, 'brokerDeleteInactiveTopicsFrequencySeconds' will be used
   # Topics that are inactive for longer than this value will be deleted
   brokerDeleteInactiveTopicsMaxInactiveDurationSeconds=
   ```


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