簡體   English   中英

刪除從Java Spring Kafka偵聽器創建的使用者組

[英]Remove consumer group created from java spring Kafka listener

我正在使用Spring kafka偵聽器從kafka主題讀取消息。

@KafkaListener( id = "member-group", topics = "member-updated" )

我過去每次(通過更改組ID上方)創建一個新的使用者組以使用所有記錄。 現在我大約有50個消費群,我想刪除它們。 我試圖從kafka Windows客戶端中刪除-

kafka-consumer-groups.bat --zookeeper <zookeeper-url> --delete --group <group-name>

但失敗,並顯示以下輸出-

Note: This will only show information about consumers that use ZooKeeper (not those using the Java consumer API).
Error: Delete for group '<group-name>' failed because group does not exist.

因此,有什么方法可以通過代碼或其他工具刪除這些使用者組。 什么是消費者組的默認保留策略。

使用--bootstrap-server host:port而不是--zookeeper

運行不帶任何參數的腳本以獲取幫助...

--bootstrap-server <String: server to   REQUIRED (for consumer groups based on 
  connect to>                             the new consumer): The server to     
                                          connect to.                          
...
--zookeeper <String: urls>              REQUIRED (for consumer groups based on 
                                          the old consumer): The connection    
                                          string for the zookeeper connection  
                                          in the form host:port. Multiple URLS 
                                          can be given to allow fail-over.     

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM