定制 yevhenlisovenko/nano-service 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yevhenlisovenko/nano-service

最新稳定版本:v8.0.0

Composer 安装命令:

composer require yevhenlisovenko/nano-service

包简介

nano-service

README 文档

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:^8

Features

  • Publisher — events to RabbitMQ with database fallback (outbox pattern). In-process circuit breaker for HTTP/CLI contexts.
  • Consumer — events with retry logic, dead-letter queue, idempotency (inbox pattern). Crash-and-restart recovery model (k8s restartPolicy: Always) — see v8.0.0 CHANGELOG.
  • 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()
LOGGING_STANDARDS.md Structured logging schema for observability
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, crash-and-restart recovery, retry logic

Development

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

License

MIT License

统计信息

  • 总下载量: 5.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-20