#pragma once #include #include #include #include #include #include #include #include #include #include #include #include namespace Poco { namespace Util { class AbstractConfiguration; } } namespace DB { class VirtualColumnsDescription; struct KafkaSettings; namespace StorageKafkaUtils { Names parseTopics(String topic_list); String getDefaultClientId(const StorageID & table_id); using ErrorHandler = std::function; void drainConsumer( cppkafka::Consumer & consumer, std::chrono::milliseconds drain_timeout, const LoggerPtr & log, ErrorHandler error_handler = [](const cppkafka::Error & /*err*/) {}); using Messages = std::vector; void eraseMessageErrors(Messages & messages, const LoggerPtr & log, ErrorHandler error_handler = [](const cppkafka::Error & /*err*/) {}); SettingsChanges createSettingsAdjustments(KafkaSettings & kafka_settings, const String & schema_name); bool checkDependencies(const StorageID & table_id, const ContextPtr& context); VirtualColumnsDescription createVirtuals(StreamingHandleErrorMode handle_error_mode); } } template <> struct fmt::formatter : fmt::ostream_formatter { }; template <> struct fmt::formatter : fmt::ostream_formatter { };