ClickHouse/tests/integration/test_storage_kafka/configs/kafka.xml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
2.3 KiB
XML
Raw Normal View History

<clickhouse>
<kafka>
<!-- Debugging of possible issues, like:
- https://github.com/edenhill/librdkafka/issues/2077
- https://github.com/edenhill/librdkafka/issues/1778
- #5615
XXX: for now this messages will appears in stderr.
-->
<debug>cgrp,consumer,topic,protocol</debug>
Allow configuration of Kafka topics with periods The Kafka table engine allows global configuration and per-Kafka-topic configuration. The latter uses syntax <kafka_TOPIC>, e.g. for topic "football": <kafka_football> <retry_backoff_ms>250</retry_backoff_ms> <fetch_min_bytes>100000</fetch_min_bytes> </kafka_football> Some users had to find out the hard way that such configuration doesn't take effect if the topic name contains a period, e.g. "sports.football". The reason is that ClickHouse configuration framework already uses periods as level separators to descend the configuration hierarchy. (Besides that, per-topic configuration at the same level as global configuration could be considered ugly.) Note that Kafka topics may contain characters "a-zA-Z0-9._-" (*) and a tree-like topic organization using periods is quite common in practice. This PR deprecates the existing per-topic configuration syntax (but continues to support it for backward compat) and introduces a new per-topic configuration syntax below the global Kafka configuration of the form: <kafka> <topic name="football"> <retry_backoff_ms>250</retry_backoff_ms> <fetch_min_bytes>100000</fetch_min_bytes> </topic> </kafka> The period restriction doesn't apply to XML attributes, so <topic name="sports.football"> will work. Also, everything Kafka-related is below <kafka>. Considered but rejected alternatives: - Extending Poco ConfigurationView with custom separators (e.g."/" instead of "."). Won't work easily because ConfigurationView only builds a path but defers descending the configuration tree to the normal configuration classes. - Reloading the configuration file in StorageKafka (instead of reading the loaded file) but with a custom separator. This mode is supported by XML configuration. Too ugly and error-prone since the true configuration is composed from multiple configuration files. (*) https://stackoverflow.com/a/37067544
2023-02-22 19:58:48 +00:00
<!-- librdkafka stat in system.kafka_consumers -->
<!-- default 3000 (every three second) seems too long for test -->
<statistics_interval_ms>600</statistics_interval_ms>
2023-02-23 20:04:41 +00:00
<kafka_topic>
<name>consumer_hang</name>
Allow configuration of Kafka topics with periods The Kafka table engine allows global configuration and per-Kafka-topic configuration. The latter uses syntax <kafka_TOPIC>, e.g. for topic "football": <kafka_football> <retry_backoff_ms>250</retry_backoff_ms> <fetch_min_bytes>100000</fetch_min_bytes> </kafka_football> Some users had to find out the hard way that such configuration doesn't take effect if the topic name contains a period, e.g. "sports.football". The reason is that ClickHouse configuration framework already uses periods as level separators to descend the configuration hierarchy. (Besides that, per-topic configuration at the same level as global configuration could be considered ugly.) Note that Kafka topics may contain characters "a-zA-Z0-9._-" (*) and a tree-like topic organization using periods is quite common in practice. This PR deprecates the existing per-topic configuration syntax (but continues to support it for backward compat) and introduces a new per-topic configuration syntax below the global Kafka configuration of the form: <kafka> <topic name="football"> <retry_backoff_ms>250</retry_backoff_ms> <fetch_min_bytes>100000</fetch_min_bytes> </topic> </kafka> The period restriction doesn't apply to XML attributes, so <topic name="sports.football"> will work. Also, everything Kafka-related is below <kafka>. Considered but rejected alternatives: - Extending Poco ConfigurationView with custom separators (e.g."/" instead of "."). Won't work easily because ConfigurationView only builds a path but defers descending the configuration tree to the normal configuration classes. - Reloading the configuration file in StorageKafka (instead of reading the loaded file) but with a custom separator. This mode is supported by XML configuration. Too ugly and error-prone since the true configuration is composed from multiple configuration files. (*) https://stackoverflow.com/a/37067544
2023-02-22 19:58:48 +00:00
<!-- default: 3000 -->
<heartbeat_interval_ms>301</heartbeat_interval_ms>
2023-02-23 20:04:41 +00:00
</kafka_topic>
<kafka_separate_settings>
<!-- This is old syntax. This setting will be set for consumer and producer-->
<!-- default 3000 -->
<heartbeat_interval_ms>302</heartbeat_interval_ms>
</kafka_separate_settings>
<consumer>
<auto_offset_reset>earliest</auto_offset_reset>
<kafka_topic>
<!-- Setting for topic will be applied only for consumer -->
<name>consumer_hang</name>
<!-- default: 10000 -->
<session_timeout_ms>6000</session_timeout_ms>
</kafka_topic>
<kafka_topic>
<name>separate_settings</name>
<!-- default: 10000 -->
<session_timeout_ms>6001</session_timeout_ms>
</kafka_topic>
</consumer>
<producer>
<kafka_separate_settings>
<!-- This is old syntax. And doesn't work inside producer and consumer tags-->
<!-- default 300000 -->
<message_timeout_ms>300001</message_timeout_ms>
</kafka_separate_settings>
<kafka_topic>
<name>separate_settings</name>
<!-- This is only producer setting, if it was applied to consumer,
it would create warning message in logs. -->
<!-- default 30000 -->
<request_timeout_ms>30001</request_timeout_ms>
</kafka_topic>
<!-- default 60000 -->
<transaction_timeout_ms>60001</transaction_timeout_ms>
</producer>
</kafka>
</clickhouse>