Skip to main content

Module loopback

Module loopback 

Source
Expand description

The C ABI for the in-process loopback broker.

These functions wrap [pamoja_loopback] so a caller can exercise the publish-and-subscribe path with no broker, no network, and no hardware. That matters most for the bindings: someone writing against the SDK from Python or C# can drive a whole message flow in a unit test rather than standing up infrastructure to find out whether their topics line up.

A broker is shared by cloning, so every transport built from one sees the same traffic. Pair it with pamoja_transport_faulty to check what a caller does when a link starts refusing sends.

Structs§

PamojaLoopbackBroker
An opaque handle to an in-process broker.
PamojaLoopbackTransport
An opaque handle to one in-process link to a broker.

Functions§

pamoja_loopback_broker_free
Releases a broker handle.
pamoja_loopback_broker_new
Creates an in-process broker with no traffic.
pamoja_loopback_transport_connect
Marks a link connected so it will carry traffic.
pamoja_loopback_transport_disconnect
Marks a link disconnected, so sends over it fail.
pamoja_loopback_transport_free
Releases a link handle.
pamoja_loopback_transport_is_connected
Reports whether a link is connected.
pamoja_loopback_transport_new
Creates a link to a broker.
pamoja_loopback_transport_recv
Waits for the next message on a subscribed topic.
pamoja_loopback_transport_send
Publishes a payload to a topic on the broker.
pamoja_loopback_transport_subscribe
Subscribes a link to a topic.
pamoja_transport_loopback
Creates a loopback transport for composing into a ladder or a wrapper.