Class Publisher
Defined in File publisher.hpp
Inheritance Relationships
Base Type
public email::PubSubObject
(Class PubSubObject)
Class Documentation
-
class Publisher : public email::PubSubObject
Message publisher.
Uses emails, with the topic as the email subject and the data as the email body.
Public Functions
-
explicit Publisher(const std::string &topic_name)
Constructor.
- Parameters:
topic_name – the topic name to publish on
-
virtual ~Publisher()
-
void publish(const std::string &message, std::optional<EmailHeaders> additional_headers = std::nullopt, std::optional<Timestamp> timestamp = std::nullopt)
Publish message.
- Parameters:
message – the message
additional_headers – the additional headers to include
timestamp – the timestamp to associate to this publication
-
explicit Publisher(const std::string &topic_name)