Product Decisions This Supports
- Decentralized async processing: Enables lightweight, self-contained async workflows for microservices or monoliths where external brokers (RabbitMQ, Redis) are overkill or unavailable.
- Dev/Test environments: Eliminates setup friction for local development, CI/CD pipelines, or testing by replacing complex dependencies with a filesystem-based solution.
- Cost optimization: Reduces infrastructure costs for small/medium projects by avoiding managed queue services (e.g., AWS SQS, RabbitMQ clusters).
- Roadmap for scalability: Serves as a proof-of-concept for async patterns before adopting heavier transports (e.g., Doctrine, AMQP) in production.
- Build vs. Buy: Justifies a "build" decision for teams needing minimal async capabilities without vendor lock-in.
When to Consider This Package
-
Adopt when:
- Your project has low-to-medium message volume (e.g., <10K messages/day).
- You’re in development, staging, or non-critical production environments.
- You need zero external dependencies (no DB, Redis, or broker setup).
- Debugging async workflows requires human-readable message logs (JSON files).
- Your team prioritizes simplicity over durability (messages aren’t critical for recovery).
-
Look elsewhere if:
- You need high availability (filesystem transport lacks redundancy).
- Messages must persist across deployments (files are ephemeral; lost on redeploys).
- Your workload requires scalability beyond a single machine (no distributed coordination).
- You need advanced features (retries, dead-letter queues, priority queues).
- Your project uses Symfony <5.4 or >7.0 (compatibility gap).
How to Pitch It (Stakeholders)
For Executives:
"This package lets us use Symfony Messenger’s async capabilities without adding complexity or cost. For non-critical workflows—like sending emails, generating reports, or processing uploads—it replaces RabbitMQ/Redis with a simple file-based system. No infrastructure overhead, no vendor lock-in, and easy debugging. Ideal for dev environments, prototypes, or low-volume production tasks where reliability isn’t mission-critical. Think of it as ‘async-lite’: fast to implement, zero ops, and easy to replace later if needed."
For Engineers:
*"FilesystemTransport is a drop-in replacement for Symfony Messenger’s default transports, but it stores messages as JSON files in a directory instead of a DB/broker. Key benefits:
- Zero setup: Just configure a
var/messages directory.
- Debug-friendly: Inspect messages directly in files (no
doctrine:messenger:consume needed).
- Lightweight: No background workers or external services to manage.
- Symfony-native: Works seamlessly with existing Messenger components.
Use case: Perfect for local dev, CI pipelines, or non-critical async tasks. Avoid for high-stakes production where durability matters. Swap it out later for Doctrine/AMQP when you need scalability."*
For Architects:
*"This package addresses the ‘async tax’ in small projects by offering a filesystem-backed transport for Symfony Messenger. It’s a pragmatic choice for:
- Tech debt avoidance: No need to justify a broker for simple use cases.
- Portability: Works anywhere PHP runs (no OS-specific dependencies).
- Observability: JSON logs make troubleshooting trivial.
Trade-offs: Not for stateful workflows or clusters. Treat it as a temporary or niche solution—like a ‘learning mode’ for async patterns before adopting a robust broker."*