PHP Idempotent Consumer Generator
Generates robust message deduplication infrastructure for PHP 8.4 applications to ensure exactly-once processing guarantees.
This skill automates the implementation of the Idempotent Consumer pattern within PHP architectures, providing a complete framework for message deduplication using Database or Redis backends. It follows Domain-Driven Design (DDD) and Clean Architecture principles by generating deterministic key value objects, storage ports, and middleware wrappers. It is essential for developers building resilient distributed systems where preventing duplicate actions—such as double payments, redundant inventory updates, or duplicate webhook processing—is critical for data integrity.
주요 기능
01Dual storage backend support for PDO-compatible databases and Redis with TTL
02Deterministic idempotency key generation using message IDs and handler names
03Middleware-based integration for transparent message processing and result tracking
04Atomic race condition handling using database constraints and Redis SETNX
0545 GitHub stars
06Generation of comprehensive unit tests for domain, application, and infrastructure layers
사용 사례
01Ensuring exactly-once semantics in event-driven microservices and message queue consumers
02Preventing duplicate charges during payment processing message replays
03Safely handling redundant webhook deliveries from external third-party services