Class Publisher

Inheritance Relationships

Base Type

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