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

Async Laravel Package

aescarcha/async

Symfony bundle that listens to Doctrine entity lifecycle events (persist/update/remove) and publishes RabbitMQ jobs so heavy processing runs asynchronously. Configure via OldSoundRabbitMq and register the persist listener as consumer/event subscriber.

View on GitHub
Deep Wiki
Context7

A bundle to handle serialization and deseralization of Entities on Symfony, it's a layer over Symfony's Serializer Component

Frequently asked questions about Async
Can I use aescarcha/async in Laravel, or is it only for Symfony?
While originally designed for Symfony, you can adapt it for Laravel by replacing Symfony’s Doctrine listeners with Laravel’s Model Observers or EventServiceProvider, and using a RabbitMQ bridge like vladimir-yuldashev/laravel-queue-rabbitmq to handle queue consumption. The core async logic remains the same.
What Laravel versions does aescarcha/async support?
The package itself is Symfony-focused, but Laravel 5.5+ can integrate it via custom event listeners and RabbitMQ bridges. Test compatibility with your Laravel version by validating Doctrine event hooks and RabbitMQ queue drivers like php-amqplib or enqueue/rabbitmq.
How do I configure RabbitMQ for async processing in Laravel?
Install a RabbitMQ bridge like vladimir-yuldashev/laravel-queue-rabbitmq, then configure it in `config/queue.php` to use the RabbitMQ connection. Replace Symfony’s `old_sound_rabbit_mq` config with Laravel’s queue driver settings, ensuring exchange/queue names match the bundle’s expectations.
Does this package support Laravel’s Eloquent lifecycle events (e.g., saved, deleted)?
No, it’s designed for Symfony’s Doctrine events. For Laravel, map Eloquent events (e.g., `saved`, `deleted`) to RabbitMQ jobs manually in an Observer or EventServiceProvider, then dispatch jobs using Laravel’s queue system or a RabbitMQ bridge.
What happens if RabbitMQ fails during async processing?
The bundle doesn’t include retry logic or dead-letter queues. Failed jobs may be lost silently. For Laravel, pair it with a queue driver that supports retries (e.g., Redis or database queues) or implement custom error handling in the consumer callback.
Is aescarcha/async suitable for CPU-heavy tasks like image processing?
It’s optimized for I/O-bound tasks (e.g., API calls, database writes) triggered by entity events. For CPU-heavy work, consider Laravel’s process queue driver or a dedicated task queue like Supervisor, as RabbitMQ may not handle long-running processes efficiently.
How do I handle entity serialization for complex Laravel models (e.g., nested relationships)?
Use Laravel’s Serializer facade or spatie/laravel-serializable-traits to replace Symfony’s Serializer. Customize serialization logic in the consumer callback to handle nested relationships, circular references, or non-serializable properties explicitly.
Are there alternatives to aescarcha/async for Laravel async entity processing?
Yes. For lightweight tasks, use Laravel’s built-in queue system with jobs. For event-driven async, consider spatie/laravel-activitylog or custom Observers dispatching jobs. For RabbitMQ-native solutions, explore enqueue/laravel or vladimir-yuldashev/laravel-queue-rabbitmq directly.
How do I monitor failed async jobs in production?
The bundle lacks built-in monitoring. For Laravel, log job failures to a database table or monitoring tool (e.g., Sentry) by catching exceptions in the RabbitMQ consumer callback. Pair with a queue worker supervisor like Supervisor to restart failed consumers.
Can I use this package without RabbitMQ, or does it strictly require it?
No, RabbitMQ is mandatory. The bundle relies on `old_sound_rabbit_mq` for message brokering. For Laravel, ensure your RabbitMQ bridge (e.g., vladimir-yuldashev/laravel-queue-rabbitmq) is properly configured, or consider alternatives like Redis or database queues if RabbitMQ isn’t feasible.
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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
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