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

Stomp Laravel Package

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.

View on GitHub
Deep Wiki
Context7

enqueue/stomp provides a STOMP transport for the Enqueue ecosystem, implementing the Queue Interop specification so you can send and consume messages over the STOMP protocol.

Use it to integrate STOMP-capable brokers into your PHP applications with a standards-based API, backed by Enqueue’s docs and community support.

  • Queue Interop compliant transport implementation
  • Publish and consume messages via STOMP
  • Works with the broader Enqueue tooling and patterns
  • Includes CI-tested package releases and Packagist distribution
  • Documentation and support resources available online
Frequently asked questions about Stomp
How do I use enqueue/stomp with Laravel’s queue system?
Use Laravel’s `Queue::extend()` to register the STOMP transport. Configure a DSN (e.g., `stomp://user:pass@host:port`) in `config/queue.php` under the `stomp` driver. Then dispatch jobs with `Queue::dispatch()` or use `queue:work` to process them. Ensure your STOMP broker (e.g., RabbitMQ) is running and accessible.
Does enqueue/stomp support delayed jobs like Laravel’s default queue?
Yes, but you must configure the STOMP broker to support delayed messages (e.g., RabbitMQ’s `x-delay` header). Laravel’s `delay()` method will work if the broker supports it. Test with a small delay first to verify behavior, as STOMP brokers may handle delays differently than Redis or database queues.
What Laravel versions and PHP versions does enqueue/stomp support?
The package supports Laravel 9+ and requires PHP 8.1+. It adheres to Queue Interop, so it integrates seamlessly with Laravel’s queue system without version-specific hacks. Check the [Enqueue documentation](https://php-enqueue.github.io/transport/stomp/) for minor version compatibility notes.
How do I handle failed jobs with enqueue/stomp in Laravel?
Laravel’s `queue:failed-table` won’t work with STOMP. Configure a dead-letter queue (DLQ) in your STOMP broker to route failed messages. Use the broker’s management UI (e.g., RabbitMQ’s) or a custom consumer to process failed jobs. For retries, implement logic in your consumer or use the broker’s built-in retry policies.
Can I use enqueue/stomp with RabbitMQ’s AMQP plugin instead of STOMP?
No, this package is specifically for STOMP protocol. For RabbitMQ, consider `enqueue/amqp-ext` (AMQP 0-9-1) or `php-amqplib` for direct AMQP integration. STOMP is useful if you need cross-language support (e.g., Java services) or if your broker only exposes STOMP (e.g., some cloud providers).
How do I secure STOMP connections in production?
Use TLS/SSL for STOMP connections (e.g., `stomps://` instead of `stomp://`). Store credentials in Laravel’s `.env` file (e.g., `QUEUE_STOMP_DSN=stomps://user:pass@host:port`). Avoid hardcoding secrets. For authentication, ensure your broker supports SASL or basic auth securely. Monitor for unauthorized access via broker logs.
What are the performance implications of using STOMP vs. Redis or database queues?
STOMP introduces network overhead compared to in-memory Redis or database queues. Benchmark your workload, especially for high-throughput apps. STOMP shines in distributed environments where cross-language messaging or advanced routing (e.g., topics, headers) are needed. For Laravel, test with `queue:work --sleep=3` to simulate load.
How do I monitor job progress or failures with enqueue/stomp?
Use your STOMP broker’s management tools (e.g., RabbitMQ’s web UI, ActiveMQ’s console). For custom metrics, integrate Prometheus via the broker’s plugin or log job events to a monitoring system. Laravel’s `queue:failed` command won’t work; instead, poll the DLQ or broker queues programmatically for errors.
Are there alternatives to enqueue/stomp for Laravel STOMP integration?
For Laravel, alternatives include `php-stomp` (low-level client) or `laravel/queue` with Redis/RabbitMQ AMQP drivers. If you need STOMP specifically, `enqueue/stomp` is the most Laravel-friendly option due to Queue Interop compliance. For pure PHP STOMP, `stomp-php/stomp-php` is another choice but lacks Laravel integration helpers.
How do I test enqueue/stomp locally before deploying to production?
Use a local STOMP broker like RabbitMQ with Docker (`docker run -d --name rabbitmq -p 61613:61613 rabbitmq:3`). Configure the broker’s STOMP plugin (e.g., `rabbitmq-stomp`). Test with a simple consumer/producer script, then integrate with Laravel’s `queue:work`. Mock failures by sending malformed messages to verify DLQ handling.
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport