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 <librdkafka/rdkafkacpp.h>
15
#include <nlohmann/json.hpp>
16
#include <string>
17
#include <vector>
18
19
namespace
erskafka
{
26
27
class
KafkaStream
:
public
ers::OutputStream
28
{
29
public
:
30
explicit
KafkaStream
(
const
std::string& param);
31
void
write
(
const
ers::Issue
& issue)
override
;
32
33
private
:
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
OutputStream.hpp
ers::Issue
Base class for any user define issue.
Definition
Issue.hpp:76
ers::OutputStream
ERS abstract output stream interface.
Definition
OutputStream.hpp:48
erskafka::KafkaStream::m_partition
std::string m_partition
Definition
KafkaStream.hpp:34
erskafka::KafkaStream::m_producer
RdKafka::Producer * m_producer
Definition
KafkaStream.hpp:35
erskafka::KafkaStream::write
void write(const ers::Issue &issue) override
Definition
KafkaStream.cpp:120
erskafka::KafkaStream::kafka_exporter
void kafka_exporter(std::string input, std::string topic)
Definition
KafkaStream.cpp:94
erskafka::KafkaStream::KafkaStream
KafkaStream(const std::string ¶m)
Definition
KafkaStream.cpp:23
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:54
erskafka
Definition
KafkaStream.cpp:22
Generated on
for DUNE-DAQ by
1.18.0