ark::pipeline::PublisherBase

Defined in header “ark/pipeline/publisher.hh”.


This is the base class of the publisher, which is used template-free to make it easier to store within pipelines/stages.

Methods

  • PublisherBase(std::string channel_name)
    Constructor. Initializes with the given channel name.

  • ~PublisherBase()
    Virtual destructor, to make things polymorphic.

  • const std::string & channel_name()
    Returns the channel name of this publisher.

  • const std::type_info & message_type()
    Returns type information about the messages that flow through this publisher.

  • std::string message_schema_registry()
    Returns the schema registry for the object that flows over this publisher, if available.

  • std::string message_schema_protocol()
    Returns the message schema protocol (rbuf, proto, etc) of the object that flows over this subscriber.

  • std::string message_type_name()
    Returns the message type name of the object that flows over this publisher.

  • bool message_is_serializable()
    Returns true if the message type for this subscriber is serializable.

  • bool connect(EnvelopeCarrierPtr subscriber)
    Connects a subscriber to this publisher. Any message published through this publisher will be sent to this subscriber.

    Returns true if the subscriber was connected, false if it was already connected. Throws if there is a type or name mismatch.

  • void shutdown()
    Shuts the publisher down, clearing all internal state and references to subscribers.

  • PublisherStatistics statistics()
    Returns statistics related to this publisher.