问题描述
尝试使用融合文档中提供的某些参数时,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 中列出了这些选项。