ark::pipeline::EnvelopeCarrier

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


This represents an object that can ‘carry’ envelopes to some source. For example, it might be a subscriber, which consumes envelopes and stores them on behalf of a stage, or it might be something that simply delivers envelopes along a more complex chain.

Methods

  • ~EnvelopeCarrier()
    Virtual destructor, for cleanup.

  • void push(DataEnvelopePtr message)
    Pushes a data envelope onto this carrier. It can then choose where to deliver it.

  • void push(AbstractEnvelopeCPtr message)
    Pushes a envelope onto this carrier. It can then choose where to deliver it.

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

  • bool consumes_type(const std::type_info & type)
    Returns true if this subscriber can execute envelopes of the given type or not.

  • bool consumes_message_type(const std::string & type)
    Returns true if this subscriber can execute messages of the given message type or not. Assumes the type is serializable.

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

  • std::string message_schema_registry()
    Returns the message schema, if this is a serializable carrier. Throws otherwise.

  • bool message_is_serializable()
    Returns true if the message is serializable.

  • void record_publisher_connection()
    Marks that this subscriber has been connected to a new publisher.