userver: samples/kafka_service/main.cpp
Loading...
Searching...
No Matches
samples/kafka_service/main.cpp
#include <userver/kafka/consumer_component.hpp>
#include <userver/kafka/producer_component.hpp>
#include <userver/storages/secdist/provider_component.hpp>
#include <consumer_handler.hpp>
#include <producer_handler.hpp>
int main(int argc, char* argv[]) {
const auto components_list = components::MinimalServerComponentList()
.Append<kafka_sample::ConsumerHandler>()
.Append<kafka_sample::ProducerHandler>()
.Append<kafka::ConsumerComponent>("kafka-consumer")
.Append<kafka::ProducerComponent>("kafka-producer")
.Append<components::Secdist>()
.Append<components::HttpClient>()
.Append<server::handlers::TestsControl>();
return utils::DaemonMain(argc, argv, components_list);
}