DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
KafkaStream.hpp
Go to the documentation of this file.
1
9
10#ifndef ERSES_KAFKASTREAM_HPP
11#define ERSES_KAFKASTREAM_HPP
12
13#include <ers/OutputStream.hpp>
14#include <librdkafka/rdkafkacpp.h>
15#include <nlohmann/json.hpp>
16#include <string>
17#include <vector>
18
19namespace erskafka {
26
28{
29public:
30 explicit KafkaStream(const std::string& param);
31 void write(const ers::Issue& issue) override;
32
33private:
34 std::string m_partition;
35 RdKafka::Producer* m_producer;
36 void ers_to_json(const ers::Issue& issue, size_t chain, std::vector<nlohmann::json>& j_objs);
37 void kafka_exporter(std::string input, std::string topic);
38};
39} // namespace erskafka
40
41#endif
Base class for any user define issue.
Definition Issue.hpp:76
ERS abstract output stream interface.
RdKafka::Producer * m_producer
void write(const ers::Issue &issue) override
void kafka_exporter(std::string input, std::string topic)
KafkaStream(const std::string &param)
void ers_to_json(const ers::Issue &issue, size_t chain, std::vector< nlohmann::json > &j_objs)