使用clickhouse和kafka引擎的模式注册认证



我想从kafka主题消费AvroConfluent格式的消息,并将它们存储在clickhouse表中,所以我创建了一个带有kafka引擎的表,并在表设置中输入了我的模式注册表url,但是模式注册表服务器需要基本的身份验证,我不确定在哪里以及如何放置我的用户信息。像kafka认证配置我试着把我的信息在config.xml文件clickhouse-server,但显然它不工作

要定义认证凭据,它需要:

  1. 打开config . xml
sudo nano /etc/clickhouse-server/config.d/config.xml
  1. 通过必需的参数扩展kafka-元素:
<kafka>
<security_protocol>sasl_plaintext</security_protocol>
<sasl_mechanism>PLAIN</sasl_mechanism>
<sasl_username>test</sasl_username>
<sasl_password>test</sasl_password>
<!-- .. -->
</kafka>
  1. restart clickhouse service
sudo service clickhouse-server restart

详情见https://altinity.com/blog/clickhouse-kafka-engine-faq。

您需要在表设置中的模式注册中心URL中通过用户身份验证-http://username:password@example.com

format_avro_schema_registry_url = https://{api_key}:{api_secret}@{schema_registry_url};

最新更新