What does it do?
- Runs an AMQP 0-9-1 server: listener, framing, protocol header, handshake, and channels.
- Provides an in-memory model: queues, exchanges, bindings, and the usual test-oriented flows (
basic.publish,basic.get,basic.consume, etc.) in a simplified but protocol-faithful way. - Exposes a controllable mock API so tests can define behaviour per method (
stub/3,expect/4), inject faults or edge cases, and inspect call history (calls/1) for assertions. - Each
FauxMQ.start_link/1instance is isolated (its own listener, mock process, and broker state), so tests can run multiple brokers or isolate cases cleanly.
What it is not
FauxMQ is not a production message broker. It prioritises protocol-level testing and ergonomics over throughput, full RabbitMQ parity, or advanced broker semantics.