文档中提供的使用Kafka rest配置选项consumer.instance.timeout.ms的问题

问题描述

尝试使用融合文档中提供的某些参数时,Kafka rest代理失败。
如果尝试使用文档[https://docs.confluent.io/current/kafka-rest/config.html]中提供的consumer.instance.timeout.ms之类的参数,则会失败。

请求

curl -X POST http://172.16.x.x:8082/consumers/onerp -H "Content-Type: application/vnd.kafka.v2+json" -d '{"name": "ins-b","format": "binary","auto.offset.reset": "earliest","auto.commit.enable": "false","consumer.instance.timeout.ms": 180000}'

回复

{"error_code":422,"message":"Unrecognized field: consumer.instance.timeout.ms"}

但是,具有最少配置选项的请求成功:

curl -X POST http://172.16.x.x:8082/consumers/onerp -H "Content-Type: application/vnd.kafka.v2+json" -d '{"name": "ins-b","auto.commit.enable": "false"}'

我正在docker上运行最新版本的Confluent平台5.5.1,仅使用zookeeper,kafka,schema-registry和rest-proxy服务。
这不是使用配置选项的正确方法,还是还有其他使用这些配置选项的方法?

解决方法

您链接到的文档(特别是 consumer.instance.timeout.ms 参数)适用于 Kafka REST 代理服务器本身。

仅支持一部分选项以允许使用者通过 API 进行自我配置,the API reference 中列出了这些选项。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...