--- title: "Apache ActiveMQ Artemis driver" description: "The babelqueue-artemis drop-in driver — a polyglot Apache ActiveMQ Artemis queue on Laravel over STOMP. Produces and consumes the canonical envelope; Artemis bridges STOMP ↔ AMQP 1.0 ↔ JMS, so Java/.NET/Node/Python/Go SDKs interop natively." source: https://babelqueue.com/docs/laravel/1.x/apache-activemq-artemis/ updated: 2026-06-15T00:00:00.000Z --- # Apache ActiveMQ Artemis driver `babelqueue-artemis` is a **drop-in queue connection** that makes an Apache ActiveMQ **Artemis** broker polyglot from Laravel. Artemis speaks AMQP 1.0 (not RabbitMQ's 0-9-1) and has no strong native PHP client, so this driver reaches it over **STOMP** (the §7 PHP path — [ADR-0018](/docs/spec/1.x/broker-bindings/#apache-activemq-artemis)). Artemis bridges **STOMP ↔ AMQP 1.0 ↔ JMS** on the same address, so a message this driver produces is consumed natively by the Java (JMS) and .NET / Node / Python / Go (AMQP 1.0) Artemis SDKs — and vice versa. Unlike the produce-only framework-less [`StompTransport`](/docs/php-sdk/1.x/transports/#stomptransport-artemis), this Laravel driver **produces and consumes**: it's a full queue connection, so the standard worker pops, routes by URN and acks/releases. ## Requirements The pure-PHP STOMP client is required: ```bash composer require stomp-php/stomp-php ``` ## Configuration Add a connection in `config/queue.php` with `driver` set to `babelqueue-artemis`: ```php 'connections' => [ 'babelqueue-artemis' => [ 'driver' => 'babelqueue-artemis', 'host' => env('ARTEMIS_HOST', '127.0.0.1'), 'port' => env('ARTEMIS_PORT', 61613), // Artemis STOMP acceptor 'username' => env('ARTEMIS_USER', 'artemis'), 'password' => env('ARTEMIS_PASSWORD', 'artemis'), 'queue' => env('BABELQUEUE_QUEUE', 'orders'), 'options' => ['ssl' => false], // 'ssl' => true uses stomp+ssl ], ], ``` The connector hands the queue a **lazy factory** (no eager socket), so it builds and connects the STOMP client on first use and reconnects transparently after a drop — mirroring the RabbitMQ connector. ## Produce Producing is identical to the other BabelQueue drivers — see [Producing messages](/docs/laravel/1.x/producing-messages/). Send to the **anycast** address (the default for an auto-created JMS queue) so the JMS/AMQP-1.0 consumers receive it: ```php use BabelQueue\Facades\BabelQueue; BabelQueue::connection('babelqueue-artemis') ->publish('urn:babel:orders:created', ['order_id' => 1042]); ``` The envelope JSON is the STOMP frame **body** (authoritative); `trace_id` rides the native `correlation-id` header, and the §7 `bq_` application properties (`bq_schema_version` / `bq_source_lang` / `bq_attempts` / `bq_app_id`) use **underscores** because a JMS property name must be a valid Java identifier ([ADR-0017](/docs/spec/1.x/broker-bindings/#apache-activemq-artemis)). ## Consume Run the standard worker against the connection: ```bash php artisan queue:work babelqueue-artemis ``` Polyglot messages — including those produced by **another language's SDK** over JMS or AMQP 1.0 — are decoded, routed by URN through the dispatcher and handled; standard Laravel jobs on the same connection run as normal. Register handlers exactly as for any other driver — see [Consuming messages](/docs/laravel/1.x/consuming-messages/). > **Routing is body-authoritative** (§7.8). A STOMP custom header can't set the > `x-opt-jms-type` annotation the §7 consumers prefer, so routing falls back to the > envelope's `job` URN — which is always present, so a STOMP-produced message routes > correctly against every Artemis SDK. Because the wire format is the [canonical envelope](/docs/spec/1.x/envelope/), a message your Laravel app consumes may have been produced by any BabelQueue SDK, and vice-versa. See the [Artemis binding](/docs/spec/1.x/broker-bindings/#apache-activemq-artemis) for the full native projection.