overblog/activemq-bundle
Symfony bundle that integrates Apache ActiveMQ messaging into your application. It provides configuration for STOMP connections, message producers and consumers, and seamless service wiring, making it easy to add reliable queue-based communication to Symfony projects.
This is a Symfony bundle, not a Laravel package, so the first decision is whether you are evaluating it inside a Symfony app or trying to bolt it onto Laravel. In a Laravel codebase the honest answer is: don't. Install the underlying stomp-php client instead and treat this repo as a reference implementation of the producer/consumer pattern. If you are in Symfony:
composer require overblog/activemq-bundle (expect to pin old transitive deps — last release was March 2018).Overblog\ActiveMqBundle\OverblogActiveMqBundle in AppKernel (Symfony 2/3 era) or bundles.php (Symfony 4).overblog_active_mq key, pointing at your broker's STOMP transport (default port 61613), not OpenWire (61616).DependencyInjection/Configuration.php — it is the real documentation for the bundle. Every option you can pass lives there.$producer->send('queue/orders', $json)), then consume it with the bundle's console command in a separate long-running process.Before writing any code, confirm the broker has a STOMP connector enabled:
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
Producer-per-use-case. Define each logical producer in config rather than sharing one generic producer. This keeps queue naming, persistence, and priority settings declarative:
overblog_active_mq:
connections:
default:
host: "%activemq_host%"
port: 61613
producers:
order_events:
connection: default
destination: /queue/order.events
persistent: true
consumers:
order_events:
connection: default
destination: /queue/order.events
callback: app.order_consumer
Inject the producer service, don't build one. The bundle exposes each producer as overblog_active_mq.producer.<name>. Inject that into your service or job class and call send($destination, $body, $headers). Keeping this as a thin adapter around an interface lets you swap to a real queue driver later without touching domain code.
Run consumers out-of-band. The consumer is a console command intended to run under Supervisor/systemd, not in the web request cycle. One process per queue, restart on deploy, and log to a file the broker can be correlated against. For Laravel users replicating this: a queue worker command plus stomp-php's subscribe()/readFrame() loop is the equivalent.
Request/reply. For synchronous integrations with a legacy Java/.NET system, publish to a request queue with a reply-to header pointing at a temporary queue, then block on the reply. Wrap this in a timeout and a circuit breaker — STOMP gives you no built-in RPC semantics.
Fan-out and DLQ. Use topics (/topic/...) for broadcast and rely on the broker's DLQ/redelivery policy rather than implementing retries in PHP. Set activemq.redeliverypolicy.maximumRedeliveries on the broker and let poison messages land in ActiveMQ.DLQ.
Integration tip for Laravel devs: if you must interoperate with an existing ActiveMQ estate, use stomp-php directly and mirror the bundle's structure — a Producer class per destination, a Worker command that wraps the subscribe loop, and config in config/activemq.php. You get 90% of the value without the Symfony coupling.
fusesource/stomp-php API is now stomp-php. Treat it as a design reference, not a dependency you ship to production.telnet host 61613 before blaming the code.client acks mean a crashed worker redelivers, auto means messages are lost on failure. Confirm the mode in config and test by killing the worker mid-message.--time-limit restart strategy via Supervisor so workers recycle.debug: true on the connection (or stomp-php's debug flag) to log raw frames; combine with the ActiveMQ web console (/admin) to inspect queue depth and DLQ. If messages vanish, check that persistent: true is set — non-persistent messages are dropped on broker restart.callback option pointing at a service implementing __invoke/execute; that service is the right place for your retry, metrics, and dead-lettering logic rather than the bundle itself.enqueue/amqp or Symfony Messenger with a STOMP/AMQP transport. Budget for it early — the bus-factor here is effectively zero.How can I help you explore Laravel packages today?