enqueue/amqp-ext
AMQP transport for Enqueue implementing amqp-interop using the PHP amqp extension. Connect Enqueue to RabbitMQ/AMQP brokers with a native extension-based driver. Documentation and support links included.
enqueue/laravel) or standalone for direct AMQP interactions.QueueInterface).Dsn, Context). Laravel’s Service Container can inject AMQP clients transparently.enqueue/amqp-ext via enqueue/laravel package.Enqueue\AmqpExt\AmqpConnectionFactory to create direct AMQP connections (bypassing Laravel’s queue system).ext-amqp PHP extension required (not bundled). Must be installed system-wide (e.g., pecl install amqp).| Risk Area | Mitigation Strategy |
|---|---|
| Extension Dependency | Validate ext-amqp compatibility with PHP 8.1+ and Laravel’s runtime. |
| AMQP Complexity | Start with simple queues (direct exchanges), gradually adopt topics/routings. |
| Error Handling | Use enqueue/amqp-tools for retry logic and dead-letter queues. |
| Performance | Benchmark against Laravel’s default drivers (e.g., sync, database). |
| Debugging | Leverage enqueue/amqp-tools’s inspection tools and RabbitMQ’s management UI. |
redis) suffice, or does AMQP’s persistence/routing justify the switch?Illuminate\Queue drivers with enqueue/laravel (wraps amqp-ext).config/queue.php:
'connections' => [
'amqp' => [
'driver' => 'enqueue',
'dsn' => 'amqp://user:pass@rabbitmq:5672/%2f',
],
],
amqp-ext standalone for cross-service communication (e.g., publish/subscribe).AmqpConnectionFactory via Laravel’s Service Container.enqueue/symfony for dependency injection and configuration.enqueue/amqp-ext.| Component | Compatibility Notes |
|---|---|
| Laravel 10+ | Fully supported (PHP 8.1+). |
| PHP Extensions | Requires ext-amqp (v1.9.3 or v2.0.0). |
| Broker Support | RabbitMQ (primary), compatible with AMQP 0-9-1. |
| Existing Code | Minimal changes if using enqueue/laravel (PSR-15/17 compliant). |
| Third-Party Packages | Conflicts unlikely, but test with laravel-horizon or spatie/queueable-messages. |
composer require enqueue/amqp-ext enqueue/laravel queue-interop/amqp-interop
pecl install amqp
config/queue.php and .env with AMQP DSN.php artisan queue:work with AMQP connection.ext-amqp and amqp-ext for security patches (e.g., CVE fixes).enqueue/amqp-tools for CLI inspection (e.g., enqueue:consume).'log_level' => LogLevel::DEBUG).php-enqueue.amqp-ext or enqueue/laravel.prefetch_count to balance throughput and memory usage.AmqpConnection objects to reduce overhead.enqueue/redis for fanout).| Failure Scenario | Mitigation |
|---|---|
| Broker Down | Implement local retries + circuit breaker (e.g., spatie/queueable-messages). |
| Message Loss | Enable publisher confirms and persistent messages in AMQP. |
| Consumer Crash | Use supervisord or Kubernetes liveness probes to auto-rest |
How can I help you explore Laravel packages today?