12#include "../../messages/Message.hpp"
13#include "../Transport.hpp"
51using DestinationTransportPtr = std::unique_ptr<DestinationTransport>;
virtual int64_t pendingMessageCount() const noexcept
Return the number of pending message in this transport or -1 if unknown.
Definition DestinationTransport.hpp:48
virtual bool deliver(MessagePtr message)=0
Performs the actual delivery of a message.
DestinationTransport(Endpoint endpoint, nlohmann::json config)
Constructs a DestinationTransport with the Role::Destination role.
Definition DestinationTransport.hpp:32
Definition Endpoint.hpp:24
Endpoint const & endpoint() const noexcept
Gets the endpoint descriptor associated with this transport.
Definition Transport.hpp:161
nlohmann::json const & config() const noexcept
Gets the JSON configuration used to initialize this transport.
Definition Transport.hpp:176
Role
Defines the operational role of a transport relative to a channel.
Definition Transport.hpp:130
@ Destination
The transport acts as a message consumer for the channel.
Definition Transport.hpp:132
Transport(Role role, Endpoint endpoint, nlohmann::json config)
Constructs a transport instance.
Definition Channel.hpp:25
std::unique_ptr< Message > MessagePtr
Unique ownership handle for messages.
Definition Message.hpp:27