# pamoja-loopback
In-process loopback transport for pamoja: a broker-free Transport for tests, examples, and simulators.
<a href="https://pamoja.molex.cloud/docs/reference/rust/pamoja_loopback/index.html"><img height="28" alt="API reference" src="https://raw.githubusercontent.com/molexxxx/pamoja/main/.github/badges/btn-api.svg"></a>
<a href="https://pamoja.molex.cloud/docs/guides/loopback.html"><img height="28" alt="read the guide" src="https://raw.githubusercontent.com/molexxxx/pamoja/main/.github/badges/btn-guide.svg"></a>
<a href="https://crates.io/crates/pamoja-loopback"><img height="28" alt="crates.io" src="https://raw.githubusercontent.com/molexxxx/pamoja/main/.github/badges/btn-cratesio.svg"></a>
<a href="https://docs.rs/pamoja-loopback"><img height="28" alt="docs.rs" src="https://raw.githubusercontent.com/molexxxx/pamoja/main/.github/badges/btn-docsrs.svg"></a>
## The same capability in every language
| Rust | [`pamoja-loopback`](https://crates.io/crates/pamoja-loopback) | [reference](https://pamoja.molex.cloud/docs/reference/rust/pamoja_loopback/index.html), [docs.rs](https://docs.rs/pamoja-loopback) |
| TypeScript | [`@pamoja/loopback`](https://www.npmjs.com/package/@pamoja/loopback) | [reference](https://pamoja.molex.cloud/docs/reference/node/modules/_pamoja_loopback.html) |
| Python | [`pamoja-loopback`](https://pypi.org/project/pamoja-loopback/) | [reference](https://pamoja.molex.cloud/docs/reference/python/pamoja/loopback.html) |
| C# | [`Pamoja.Loopback`](https://www.nuget.org/packages/Pamoja.Loopback) | [reference](https://pamoja.molex.cloud/docs/reference/dotnet/api/Pamoja.Loopback.html) |
An in-process loopback transport for hardware-free testing and examples.
`LoopbackTransport` implements the core `Transport`
trait against a shared in-memory `LoopbackBroker` instead of a network, so
examples, the simulators, and the cross-language conformance scenarios can
exercise the full publish/subscribe path with no broker process and no
hardware. Topic filters follow MQTT semantics, including the `+` single-level
and `#` multi-level wildcards.
Clone one broker into every transport that should share a namespace: a publish
on any transport is delivered to every transport whose subscriptions match.
`Faulty` decorates any transport to inject send failures, so degraded-link
behavior such as store-and-forward retry can be tested deterministically.
## License
MIT - part of the [pamoja](https://github.com/molexxxx/pamoja) workspace: one memory-safe Rust core with bindings for every language.