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

Micro Bus Laravel Package

amranidev/micro-bus

Laravel/Lumen package for building event-driven microservices on AWS using SNS/SQS. Provides publisher/subscriber setup, config publishing, and env-based credentials to implement Pub-Sub messaging between services.

View on GitHub
Deep Wiki
Context7

Build your laravel/lumen microservice application with AWS SNS/SQS

Frequently asked questions about Micro Bus
How do I install MicroBus in a Laravel project?
Run `composer require amranidev/micro-bus` to install the package. Then publish the publisher and subscriber configs with `php artisan vendor:publish --tag=publisher` and `php artisan vendor:publish --tag=subscriber`. Finally, add your AWS credentials and SQS/SNS settings to your `.env` file.
Does MicroBus work with Laravel and Lumen?
Yes, MicroBus is designed to work seamlessly with both Laravel and Lumen. The package leverages Laravel’s service container and event system, making it compatible with both frameworks.
What Laravel versions does MicroBus support?
MicroBus is compatible with Laravel 8.x and 9.x. Check the package’s documentation or repository for the latest supported versions, as updates may expand compatibility.
How do I configure AWS credentials for MicroBus?
AWS credentials are configured via environment variables in your `.env` file. Use `SUBSCRIBER_SQS_KEY`, `SUBSCRIBER_SQS_SECRET`, and similar variables for SQS/SNS access. The package supports environment-driven AWS keys for security.
Can I use MicroBus for testing event-driven workflows?
MicroBus itself doesn’t include built-in testing utilities, but you can mock AWS services (like SQS/SNS) using tools like Laravel’s `Mockery` or `VespaVelocity/mockery`. Test event publishing and consumption by verifying queue messages or simulating SNS notifications.
How do I handle event schema validation with MicroBus?
MicroBus doesn’t enforce schema validation by default, but you can implement it manually by validating event payloads before processing. Use libraries like `json-schema` or define custom validation logic in your event handlers.
What’s the best way to debug issues with MicroBus in production?
Enable AWS CloudWatch logs for SQS/SNS to track message flow. Use Laravel’s logging system to log event publishing and consumption. For debugging, check SQS dead-letter queues (DLQ) for failed messages and ensure proper IAM permissions are set.
Are there alternatives to MicroBus for Laravel event-driven microservices?
Yes, alternatives include `spatie/laravel-aws` for AWS integration, `laravel-ecosystem/laravel-event-sourcing`, or `symfony/messenger` for a more generic approach. MicroBus is tailored for SNS/SQS, while others may offer broader or different features.
How do I migrate from Laravel’s native queues to MicroBus?
Start by identifying events that can be decoupled into microservices. Replace direct database calls with event emissions using MicroBus’s publisher. Gradually migrate queue workers to consume events via SQS, ensuring backward compatibility during the transition.
Does MicroBus support cross-account AWS event routing?
MicroBus itself doesn’t enforce cross-account routing, but you can configure it manually by setting up SNS topics with cross-account policies and ensuring IAM roles have the necessary permissions (e.g., `sns:Publish` and `sqs:SendMessage`).
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope