Class StatKafkaMessageSender
Defined in File StatKafkaMessageSender.h
Class Documentation
-
class StatKafkaMessageSender
Sends a particular message type and topic to Kafka.
Public Functions
Construct a new Stat Kafka Message Sender object.
- Parameters
topic – the topic to which messages will be sent
producer – the Kafka publisher used to send messages
generator – the generator used to create the message payload
-
void send_stats(const StatStorage &storage)
Send a stat message to Kafka.
- Parameters
storage – the computed statistics from which to generate the message
-
inline const std::string &get_topic()
Get the topic that the sender is configured with.
- Returns
the topic that the sender is configured with.
-
inline const std::shared_ptr<StatKafkaMsgGenerator> &get_generator()
Get the message generator that the sender is configured with.
- Returns
the message generator that the sender is configured with.