Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Message Bus Laravel Package

simple-bus/message-bus

Generic PHP interfaces and utilities for building message buses such as command buses and event buses. Provides reusable components to dispatch messages through middleware and handlers, forming the foundation for CQRS-style messaging in your app.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Decoupling Microservices/Modules: Enables event-driven architecture by standardizing message contracts, reducing tight coupling between services (e.g., order processing, notifications, or analytics).
  • Roadmap for Scalable Messaging: Justifies investment in a command bus (for synchronous workflows) or event bus (for async notifications) as part of a larger event-sourcing or CQRS initiative.
  • Build vs. Buy: Avoids reinventing message bus infrastructure (e.g., custom RabbitMQ/Kafka wrappers) by leveraging a battle-tested, PHP-native foundation.
  • Use Cases:
    • Internal APIs: Replace direct service-to-service calls with message passing (e.g., UserCreatedEvent → trigger email/SMS).
    • Background Jobs: Offload long-running tasks (e.g., PDF generation) via async message handlers.
    • Audit/Logging: Middleware for tracking message flow (e.g., debug failed handlers or validate payloads).

When to Consider This Package

  • Adopt if:
    • Your PHP/Laravel app needs standardized message contracts (e.g., DTOs for commands/events).
    • You’re building a modular monolith or microservices and want to avoid direct dependencies between components.
    • You prioritize testability (messages are plain objects; handlers can be mocked easily).
    • Your team lacks deep Kafka/RabbitMQ expertise but needs async/sync messaging.
  • Look elsewhere if:
    • You need built-in persistence (e.g., message queues with retention); pair this with Laravel Queues or Redis Streams.
    • Your use case requires exactly-once delivery or complex routing (consider Laravel Horizon or Pulsar).
    • You’re in a JavaScript-heavy stack (e.g., Node.js); this is PHP-first.
    • You need real-time pub/sub (WebSockets + Laravel Echo may fit better).

How to Pitch It (Stakeholders)

For Executives: "This package lets us build a scalable, decoupled system where services communicate via messages (e.g., ‘OrderPlaced’ events) instead of direct calls. It’s like upgrading from phone calls to email/SMS for our app’s components—more reliable, easier to debug, and future-proof for growth. Minimal upfront cost; we reuse it for both sync (commands) and async (events) workflows."

For Engineers: *"SimpleBus gives us interfaces for messages and handlers, so we can:

  • Decouple services (e.g., UserService doesn’t need to know about EmailService).
  • Add middleware (e.g., logging, validation) without touching business logic.
  • Test handlers in isolation (no DB/HTTP dependencies). Pair it with Laravel Queues for async, or use it directly for sync workflows. Low learning curve—just define messages as classes and wire handlers."*

Key Tradeoff: "We avoid vendor lock-in (MIT license) and reinventing the wheel, but we’ll need to integrate it with our existing queue system (e.g., RabbitMQ, SQS). Long-term, it reduces tech debt for messaging patterns."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky