【问题标题】:In Pulsar is there a way to clean-up old durable subscriptions that do not have a consumer attached?在 Pulsar 中,有没有办法清理没有附加消费者的旧的持久订阅?
【发布时间】:2021-11-01 04:29:45
【问题描述】:

我有一个 Spark 应用程序,它留下了对 Pulsar 的持久订阅,当所有消费者实际上都是最新的时,我的积压工作似乎在增加。有没有办法使不再使用的订阅(即未附加到消费者)过期或删除,而让其他订阅(其中一些可能闲置)不理会?

【问题讨论】:

    标签: apache-pulsar


    【解决方案1】:

    您可以使用以下 CLI 命令在全局 broker.conf 中或在命名空间级别配置 Pulsar 以使没有消费者连接的订阅过期:

    bin/pulsar-admin namespaces set-subscription-expiration-time
    
    Set subscription expiration time for a namespace
    Usage: set-subscription-expiration-time [options] tenant/namespace
      Options:
      * -t, --time
          Subscription expiration time in minutes
          Default: 0
    

    将此设置为非零值会启用该功能。

    【讨论】:

      猜你喜欢
      • 2016-03-22
      • 2017-02-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-24
      • 2018-07-07
      • 2017-10-31
      • 2013-07-01
      相关资源
      最近更新 更多