bytespin/messenger-dedupe-bundle
messenger_messages table to enforce uniqueness via a dedupe key (e.g., message_id, payload_hash, or custom fields).MessageBus without requiring major architectural changes.doctrine:schema:update) to add a dedupe_key column to messenger_messages. This is a blocker if the schema is tightly controlled (e.g., shared databases or CI/CD constraints).dedupe_key customization (e.g., via YAML or DIC). No runtime dependencies beyond Symfony’s core.INSERT/UPDATE).dedupe_key be defined? (e.g., message_id, payload_hash, or business-specific fields like order_id + action).messenger_messages table is locked or unavailable? (e.g., during schema migrations).retry strategy or application-layer deduplication (e.g., Redis SETNX) suffice?dedupe_key strategy (e.g., sha1(json_encode($message->getData())) or a business key like invoice_id).composer.json and register the bundle in bundles.php.doctrine:schema:update (test in a staging environment first).dedupe_key via YAML (e.g., messenger_dedupe.key_generator) or DIC:
messenger_dedupe:
key_generator: 'app.custom_dedupe_key_generator'
DedupeKeyGeneratorInterface.bus configurations.--dry-run to preview changes.SETNX).retry strategy with a unique constraint.dedupe_key strategy.dedupe_key complexity if needed.messenger_messages.dedupe_key column is persistent. Future migrations must account for it.dedupe_key and message_id for troubleshooting.DedupeKeyGenerator implementations.messenger_messages.dedupe_key if not auto-created.SETNX for low-latency needs).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Database unavailability | Duplicates may be processed. | Implement circuit breakers or fallback to app-layer deduplication. |
| Schema migration failure | Bundle fails to load. | Test migrations in staging; use rollback plans. |
dedupe_key collision (hash clash) |
False positives (unique messages rejected). | Use composite keys or longer hashes. |
| High concurrency + DB locks | Message delays or timeouts. | Optimize dedupe_key indexing; consider read replicas. |
| Bundle bug (alpha-level) | Silent message drops or corruption. | Implement retry logic with fallback to non-deduplicated bus. |
DedupeKeyGenerator implementations.dedupe_key column).How can I help you explore Laravel packages today?