DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
erskafka
src
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 <nlohmann/json.hpp>
15
#include <librdkafka/rdkafkacpp.h>
16
#include <string>
17
#include <vector>
18
19
namespace
erskafka
20
{
27
28
class
KafkaStream
:
public
ers::OutputStream
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
OutputStream.hpp
ers::Issue
Base class for any user define issue.
Definition
Issue.hpp:80
ers::OutputStream
ERS abstract output stream interface.
Definition
OutputStream.hpp:50
erskafka::KafkaStream::m_partition
std::string m_partition
Definition
KafkaStream.hpp:35
erskafka::KafkaStream::m_producer
RdKafka::Producer * m_producer
Definition
KafkaStream.hpp:36
erskafka::KafkaStream::write
void write(const ers::Issue &issue) override
Definition
KafkaStream.cpp:115
erskafka::KafkaStream::kafka_exporter
void kafka_exporter(std::string input, std::string topic)
Definition
KafkaStream.cpp:98
erskafka::KafkaStream::KafkaStream
KafkaStream(const std::string ¶m)
Definition
KafkaStream.cpp:24
erskafka::KafkaStream::ers_to_json
void ers_to_json(const ers::Issue &issue, size_t chain, std::vector< nlohmann::json > &j_objs)
Definition
KafkaStream.cpp:55
erskafka
Definition
KafkaStream.cpp:23
Generated on
for DUNE-DAQ by
1.17.0