Modules
PhoenixMicro — a production-grade microservices toolkit for Elixir/Phoenix.
OTP Application entry point for phoenix_micro.
Centralised configuration loader and validator for phoenix_micro.
DSL for defining topic consumers with concurrency control, retry logic, and middleware.
Computes the next retry delay using exponential backoff with optional jitter.
GenServer that manages the lifecycle of a single consumer subscription: subscribing to the transport, invoking the consumer module, and applying retry + DLQ logic.
Behaviour for idempotency stores.
A Phoenix.LiveDashboard page that shows real-time PhoenixMicro metrics.
The canonical message envelope for all inter-service communication.
Behaviour for pluggable message-processing middleware.
Circuit breaker middleware for consumer message handlers.
ETS-backed store for circuit breaker state.
Deduplication middleware. Checks whether a message ID has already been
successfully processed using a configured PhoenixMicro.IdempotencyStore.
ETS-backed idempotency store for development and testing.
Logs message receipt and processing outcome at the :debug level.
Logs failures at the :warning level.
Emits Telemetry span events for each message: :start, :stop, :exception.
Compatible with Telemetry.Metrics and TelemetryMetricsStatsd etc.
Middleware-level retry with exponential backoff. This is complementary to Consumer-level retry — use this when you want to retry at the middleware layer (e.g. transient DB errors) before propagating failure to the Consumer's retry logic.
Distributed tracing middleware. Propagates trace context from message headers and creates a span for each processed message.
Transactional outbox pattern for guaranteed message delivery.
Ecto schema for the outbox_messages table.
GenServer that polls the outbox_messages table and relays undelivered
messages to the configured transport.
A Plug that exposes a JSON health endpoint for phoenix_micro.
In-process ring-buffer store for PhoenixMicro Telemetry metrics.
A Broadway-backed message-processing pipeline for PhoenixMicro.Consumer.
High-level message producer with batching, async fire-and-forget, and sync-with-ack publishing.
Request-response RPC over any configured transport.
Compensation-based saga coordinator for distributed transactions.
GenServer that executes and coordinates a single saga run.
DynamicSupervisor that owns all running saga processes.
Each saga runs in its own isolated Saga.Server process.
Typed message schema contracts with version negotiation and backward-compatibility enforcement.
Represents a single field definition in a PhoenixMicro.Schema.
Version migration engine for PhoenixMicro.Schema.
ETS-backed registry mapping topic names to their schema modules.
Validation engine for PhoenixMicro.Schema.
Behaviour for pluggable message serialization.
Default JSON serializer using Jason.
No-op serializer — passes binaries through unchanged. Useful for transports (e.g. gRPC) that handle serialization externally.
Root supervisor for the phoenix_micro OTP application.
DynamicSupervisor that manages all registered consumer worker processes. Consumers are registered either
Centralised Telemetry event definitions and emission helpers.
The behaviour that every transport adapter must implement.
A GenStage Producer that bridges any PhoenixMicro.Transport into a
Broadway pipeline.
A Supervisor that owns a single transport's connection process and its
associated worker pool.
Pure-Elixir Kafka transport for phoenix_micro.
NATS transport adapter using Gnat.
RabbitMQ transport adapter using the amqp Hex package.
Redis Streams transport adapter using Redix.
Shared exponential backoff with optional full jitter.
Shared encoding/decoding helpers used across transports and the producer.
UUID v4 generation and correlation ID utilities.
A lightweight bounded worker pool built on Task.Supervisor.
Mix Tasks
Generates a PhoenixMicro consumer module with the correct DSL boilerplate.
Generates the outbox_messages table migration required by
PhoenixMicro.Outbox.
Generates a PhoenixMicro saga module with stub steps and compensations.
Hits the PhoenixMicro health endpoint and prints a formatted status table.