tripcloud/async-event-dispatcher-bundle
Symfony bundle for asynchronous event dispatching, letting applications publish events without blocking the request. Integrates with Symfony's dispatcher to queue and process listeners in the background, improving response times and decoupling event handling in PHP applications.
This is a Symfony 2 bundle (not Laravel), hosted on Bitbucket, with zero stars, zero dependents, and no Composer/Packagist presence you can rely on. Before writing any code, confirm that Symfony 2 is still acceptable in your project — Symfony 2 reached end-of-life in 2018. If you are on Symfony 3+/4+/5+, you will be fighting the bundle's kernel registration and service definitions rather than gaining anything.
Minimal steps to exercise it:
repositories entry to your composer.json pointing at https://bitbucket.org/tripcloud/asynceventdispatcherbundle, then composer require tripcloud/async-event-dispatcher-bundle. Expect to need Bitbucket credentials (app password / SSH key) if the repo is private.app/AppKernel.php inside registerBundles() (e.g. new TripCloud\AsyncEventDispatcherBundle\TripCloudAsyncEventDispatcherBundle()), matching whatever the namespace actually is once you inspect composer.json / the bundle class.app/config/config.yml. Look for the bundle's DependencyInjection/Configuration.php to confirm the exact key names — typically something like tripcloud_async_event_dispatcher: { connection: { host, port, user, password, vhost }, exchange, queue }. There is no public docs site; the Configuration class is the documentation.php-amqplib (php-amqplib/php-amqplib) or oldsound/rabbitmq-bundle. Check composer.json for the transport dependency; if it is not pulled automatically, add it.app/console rabbitmq:consumer <name> or a bundle-specific command. Grep Command/ in the bundle for the actual command name.First use case: pick the single slowest, non-critical side effect in your app — sending a transactional email, resizing an uploaded image, writing a search-index document, firing a webhook — and move only that behind the async dispatcher. Do not start by moving core domain events; get one low-risk path working end-to-end (produce → broker → consume → listener runs) before broadening.
Producer / consumer split is the whole architecture. The bundle's job is to take an in-process Symfony event, serialize it to a message, publish to RabbitMQ, and (in a separate worker process) deserialize and dispatch it back to local listeners. Your day-to-day mental model:
$dispatcher->dispatch('app.order.placed', $event). With this bundle wired in, the name is published as a message instead of (or in addition to) being handled inline. Keep the request path fast: the only work the HTTP request should do is serialize and publish.kernel.event_listener / kernel.event_subscriber) on the same event name.OrderPlacedEvent with orderId, customerId, placedAt, total) — never pass a Doctrine entity, a repository, or a service. Only scalars/arrays/DateTimeImmutable survive the wire.event_dispatcher service: sync listeners keep working, async listeners are opted-in per event name (via config like async_events: [app.order.placed]). This lets you migrate event-by-event rather than flipping the whole dispatcher.processed_events / use a unique constraint / check the entity state before applying.--memory-limit and --sleep style flags if the command supports them (Symfony 2 daemons leak). Deploy = restart workers, not just composer install.Workflow tip: treat the RabbitMQ Management UI (http://host:15672) as your primary integration test surface. Publish a message by hand into the queue and confirm the listener fires; once that works, wire up the producer. This isolates producer bugs from consumer bugs.
serialize() rather than JSON, a change to your event class (renamed property, added required arg) will break in-flight messages after deploy — drain the queue before deploying producer/consumer changes together, or version your event classes.ps aux | grep console, supervisor status)? (2) is the event actually being published — check the exchange's message rate in the RabbitMQ UI and whether the queue has a binding? (3) is the routing key / binding key mismatched? (4) is the listener registered on the consumer's container (same kernel.event_listener tag)? A common failure is registering the listener only in the web container and not the CLI container.message_id and dedupe on it.oldsound/rabbitmq-bundle if both are installed. Check Configuration.php for the connection name it registers and the service IDs it wires. Also verify vhost permissions on the RabbitMQ user — composer require succeeding tells you nothing about configure/write/read ACLs.prefetch_count/qos so one bad message doesn't starve the worker.tail -f the supervisor log. RabbitMQ Management UI shows message rates, queue depth, and unacked counts — a rising queue depth means your consumer is down or too slow; a rising unacked count means a listener is hanging. rabbitmqctl list_queues name messages messages_unacknowledged consumers is faster than the UI once you know the queue name.Messenger-style wrapper is 200 lines), delete the dependency, and control the transport config directly. That gives you the async behavior without owning an unmaintained Bitbucket dependency.How can I help you explore Laravel packages today?