yevhenlisovenko/nano-service

nano-service

Installs: 4 176

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/yevhenlisovenko/nano-service

v7.5.0 2026-02-13 19:19 UTC

README

PHP library for event-driven microservices using RabbitMQ.

Reliable event publishing and consuming with outbox/inbox pattern, circuit breaker, idempotency, and observability.

Installation

composer require yevhenlisovenko/nano-service:^7.5

Features

  • Publisher — events to RabbitMQ with database fallback (outbox pattern)
  • Consumer — events with retry logic, dead-letter queue, idempotency (inbox pattern)
  • Circuit breaker — automatic outage detection and graceful degradation
  • Metrics — opt-in StatsD metrics for publisher, consumer, HTTP, and connections
  • Connection pooling — shared static connections/channels, prevents channel exhaustion
  • Distributed tracing — trace_id chains across event hops

Documentation

Document Description
CONFIGURATION.md All environment variables
METRICS.md All metrics, tags, and when they fire
INTEGRATION.md How to integrate as publisher or consumer
TRACE_USAGE.md Distributed tracing with appendTraceId()
DEPLOYMENT.md Kubernetes templates and rollout strategy
TROUBLESHOOTING.md Common issues and solutions
CHANGELOG.md Version history and migration guides

Architecture

Document Description
Publishing Deep Dive Outbox pattern, event tracing, error handling
Consuming Deep Dive Inbox pattern, circuit breaker, retry logic

Development

Document Description
CLAUDE.md LLM development rules
Code Review Code review checklist
Bug Fixes Known issues and fixes

License

MIT License