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