我是这个领域的新手,我使用高级用户,使用confluent api并通过curl和postman运行。
使用以下步骤:
1)创建消费群组:POST http://hostname/consumers/test
{
"name": "offset_test_instance4",
"format": "json",
"auto.offset.reset": "earliest",
"auto.commit.enable": "false"
}2)使用如下接口分配分区: POST http://hostname/consumers/test/instances/offset_test_instance4/assignments
{
"partitions": [
{
"topic": "ids_mps_channel_permissions",
"partition": 2
}
]
}3)读取内容:获取http://hostname/consumers/test/instances/offset_test_instance4/records?timeout=5000&max_bytes=16777216
我从上面的get请求中得到了响应。
但当我再次命中时,它给了我新的偏移量,尽管我没有提交任何偏移量,但偏移量仍在不断增加。
因为我禁用了自动提交属性,所以我的理解是它不会提交偏移量,直到我手动提交它。
如果我遗漏了什么,请指教。
发布于 2017-07-13 07:09:36
这是预期的行为。您不必为了获取新消息而提交偏移量。这些都是独立的东西。你可能会先收到50条消息,然后再提交你的偏移量。
https://stackoverflow.com/questions/45067870
复制相似问题