|
conduit 0.6.0
Modern C++23 header-only event-dispatching / event-transport library
|
Redis pub/sub pipe — one instance binds to a single channel and carries traffic in both directions: outbound dispatch() calls PUBLISH on the channel, and any inbound message arrives on a dedicated subscriber thread, is decoded via the shared event registry, and is delivered through the inbound sink installed at attach time.
More...
#include <transport.hpp>


Public Member Functions | |
| Transport (Config config, std::shared_ptr< EventRegistry > registry={}) | |
| Transport (const Transport &)=delete | |
| Transport & | operator= (const Transport &)=delete |
| Transport (Transport &&)=delete | |
| Transport & | operator= (Transport &&)=delete |
| ~Transport () override | |
| TransportScope | scope () const noexcept override |
| void | attach_with_sink (Bus &bus, InboundSink sink) override |
| Attach to a bus using a caller-supplied inbound sink. | |
| void | detach () noexcept override |
| void | dispatch (const EventEnvelopeView &v) override |
| void | flush () override |
| bool | is_connected () const noexcept |
Public Member Functions inherited from conduit::Transport | |
| Transport ()=default | |
| Transport (const Transport &)=delete | |
| Transport (Transport &&) noexcept=default | |
| Transport & | operator= (const Transport &)=delete |
| Transport & | operator= (Transport &&) noexcept=default |
| ~Transport () override=default | |
| virtual void | attach (Bus &bus) |
| Attach to a bus. | |
Additional Inherited Members | |
Protected Member Functions inherited from conduit::Transport | |
| void | deliver_inbound (const EventEnvelopeView &v) const |
| Subclasses call this for inbound delivery instead of touching the bus directly. | |
| Bus * | bus () const noexcept |
Redis pub/sub pipe — one instance binds to a single channel and carries traffic in both directions: outbound dispatch() calls PUBLISH on the channel, and any inbound message arrives on a dedicated subscriber thread, is decoded via the shared event registry, and is delivered through the inbound sink installed at attach time.
NOTE: Redis PUBLISH returns the number of subscribers that received the message. When flags::RequireAck is set on an envelope, a return of 0 is treated as a delivery miss (logged via the future middleware hook) but does not throw — matching MQTT QoS 0/1's best-effort feel.
|
explicit |
|
delete |
|
delete |
|
override |
|
overridevirtual |
Attach to a bus using a caller-supplied inbound sink.
Wrappers use this to intercept the inbound leg without each transport needing to re-implement the hook.
Reimplemented from conduit::Transport.
|
overridevirtualnoexcept |
Reimplemented from conduit::Transport.
|
overridevirtual |
Implements conduit::Transport.
|
overridevirtual |
Reimplemented from conduit::Transport.
|
noexcept |
|
inlineoverridevirtualnoexcept |
Implements conduit::Transport.