我使用汇合平台(v3.2.0)建立了kafka平台。
我的消费者/生产者-applications是用C#编程的,使用NuGet包"合流-卡夫卡“向我的kafka流添加/获取数据。
我想知道是否可以为某个主题设置特定的使用者组id的偏移量,那么将组id“回滚”的使用者设置为我设置的偏移量?
我的想法是能够在我的消费者应用程序之外完成这个任务,我更喜欢在我需要构建的管理ui中。我只需要知道如何与卡夫卡平台沟通。这可以使用cli命令或rest来完成吗?
发布于 2017-06-24 09:03:30
在Apache 0.11 (ConfluentPlatformv3.3)中,bin/ Kafka - are命令行工具有新的选项,允许重置使用者组的偏移量。可以根据数字偏移量或时间设置偏移量。您还可以进行相对偏移量调整,如倒带100条消息或返回5分钟。
--reset-offsets Reset offsets of consumer group.
Supports one consumer group at the
time, and instances should be
inactive
Has 3 execution options: (default) to
plan which offsets to reset, --
execute to execute the reset-offsets
process, and --export to export the
results to a CSV format.
Has the following scenarios to choose:
--to-datetime, --by-period, --to-
earliest, --to-latest, --shift-by, --
from-file, --to-current. One
scenario must be choose
To define the scope use: --all-topics
or --topic. . One scope must be
choose, unless you use '--from-file'
scenario
发布于 2017-06-24 06:47:47
当你从协调员那里得到任务时就可以了。请参见最后一条消息:
使用当前的API,您不能跳转或返回分区,您将不得不再次取消订阅/订阅,但您可以轻松地将其添加到代码中。
https://stackoverflow.com/questions/44734425
复制相似问题