enqueue/stomp
Enqueue STOMP transport: a Queue Interop implementation for sending and consuming messages over the STOMP protocol. Includes docs and community support resources; MIT licensed.
enqueue/stomp package is a STOMP transport implementation for the Queue Interop specification, enabling PHP applications to interact with STOMP-compatible message brokers (e.g., Apache ActiveMQ, RabbitMQ, or any STOMP server). This is a strong fit for Laravel applications requiring asynchronous task processing, event-driven workflows, or distributed messaging without vendor lock-in.laravel/queue), this package provides alternative transport for scenarios where:
sync, database, redis) with minimal code changes, leveraging Laravel’s queue:work command or custom consumers.Illuminate\Queue\QueueManager or using a custom queue driver (via extend() in config/queue.php).Queue::extend('stomp', function ($app) {
return new StompQueue(
new \Enqueue\Stomp\StompConnectionFactory(),
$app['config']['queue.stomp']
);
});
stomp://user:pass@host:port).| Risk Area | Assessment |
|---|---|
| Broker Dependency | High. Requires a running STOMP server (e.g., RabbitMQ). Downtime or misconfiguration here directly impacts queue reliability. |
| Compatibility | Medium. STOMP brokers may have protocol quirks (e.g., RabbitMQ’s STOMP plugin vs. ActiveMQ). Testing with the target broker is critical. |
| Performance | Medium. STOMP overhead may introduce latency compared to Redis or database queues. Benchmarking is recommended for high-throughput workloads. |
| Laravel Integration | Low. The Queue Interop standard ensures seamless replacement of Laravel’s default drivers, but custom logic (e.g., job middleware) may need adjustments. |
| Security | Medium. STOMP connections must be encrypted (SSL/TLS) and credentials managed securely (e.g., Laravel’s env()). |
| Monitoring | High. Lack of built-in Laravel queue monitoring (e.g., queue:failed-table). Requires custom metrics (e.g., Prometheus) or broker-specific tools (e.g., RabbitMQ Management UI). |
laravel/queue with Redis/RabbitMQ AMQP) achieve the same with less complexity?queue:failed-table won’t work; a custom dead-letter queue (DLQ) must be configured.stomp-php/stomp-php (STOMP client), queue-interop/queue-interop (standard).guzzlehttp/guzzle (for HTTP-based STOMP over WebSocket), andrewmy/rabbitmq-management-api (if RabbitMQ-specific features are needed).php-amqplib/php-amqplib might be simpler but lacks STOMP interoperability.config/queue.php:
'stomp' => [
'dsn' => env('QUEUE_STOMP_DSN', 'stomp://guest:guest@localhost:61613'),
'options' => [
'heartbeat' => 3000,
'connect_timeout' => 5,
],
],
queue:retry and queue:failed commands (with custom DLQ logic).queue:work, Horizon, or custom workers).release($delay).AfterCommit).composer require enqueue/stomp enqueue/dsn
config/queue.php.reply-to, priority).rabbitmqctl).stomp-php/stomp-php and enqueue/dsn may require occasional updates.How can I help you explore Laravel packages today?