1#pragma once
2
3#include <Core/SettingsCollection.h>
4
5
6namespace DB
7{
8
9class ASTStorage;
10
11/** Settings for the Kafka engine.
12 * Could be loaded from a CREATE TABLE query (SETTINGS clause).
13 */
14struct KafkaSettings : public SettingsCollection<KafkaSettings>
15{
16
17
18#define LIST_OF_KAFKA_SETTINGS(M) \
19 M(SettingString, kafka_broker_list, "", "A comma-separated list of brokers for Kafka engine.", 0) \
20 M(SettingString, kafka_topic_list, "", "A list of Kafka topics.", 0) \
21 M(SettingString, kafka_group_name, "", "A group of Kafka consumers.", 0) \
22 M(SettingString, kafka_format, "", "The message format for Kafka engine.", 0) \
23 M(SettingChar, kafka_row_delimiter, '\0', "The character to be considered as a delimiter in Kafka message.", 0) \
24 M(SettingString, kafka_schema, "", "Schema identifier (used by schema-based formats) for Kafka engine", 0) \
25 M(SettingUInt64, kafka_num_consumers, 1, "The number of consumers per table for Kafka engine.", 0) \
26 M(SettingUInt64, kafka_max_block_size, 0, "The maximum block size per table for Kafka engine.", 0) \
27 M(SettingUInt64, kafka_skip_broken_messages, 0, "Skip at least this number of broken messages from Kafka topic per block", 0) \
28 M(SettingUInt64, kafka_commit_every_batch, 0, "Commit every consumed and handled batch instead of a single commit after writing a whole block", 0)
29
30 DECLARE_SETTINGS_COLLECTION(LIST_OF_KAFKA_SETTINGS)
31
32 void loadFromQuery(ASTStorage & storage_def);
33};
34
35}
36