- How do I install avto-dev/amqp-rabbit-manager in a Laravel app?
- Install it with Composer: composer require avto-dev/amqp-rabbit-manager. The package ships a service provider that Laravel 11+ discovers automatically, so no manual registration is normally required. Publish the package config with php artisan vendor:publish and fill in your broker credentials and connection settings. Make sure the ext-amqp PHP extension is present in the runtime before your first publish or consume call.
- Does amqp-rabbit-manager require the PHP amqp extension (ext-amqp)?
- Yes. The package is built on the amqp-ext client rather than a pure-PHP protocol implementation, so ext-amqp must be installed and enabled in every environment that talks to RabbitMQ. Install it with pecl install amqp or add it to your Docker image and CI runner. Without the extension Composer installation may still succeed but connection attempts will fail at runtime. This is a separate concern from the package's PHP version constraint.
- Which Laravel versions are supported by avto-dev/amqp-rabbit-manager?
- Release v2.12.0 declares a floor of ^11.0 and adds support for Laravel 13.x, so it covers Laravel 11, 12 and 13. Applications still on Laravel 10 cannot install this release and must stay pinned to an earlier minor version. Because the constraint has no explicit upper bound, check composer.json if you need certainty about future framework majors.
- How do I configure RabbitMQ connections for this package?
- Connections are defined in the package's published config file, where you specify host, port, credentials, vhost and any connection-level options. Multiple named connections can coexist, which is useful when you talk to more than one broker or vhost. Keep credentials in environment variables rather than committing them to config. The manager then resolves the connection you name when declaring topology or publishing messages.
- How do I publish a message to RabbitMQ with amqp-rabbit-manager?
- You publish through the manager's API, selecting a connection, target exchange and routing key, and passing the message body plus any properties you need. The manager exposes a clean wrapper so you are not writing raw AMQPChannel or AMQPExchange calls throughout your codebase. Set the delivery mode explicitly if you need persistent messages. Wrap publishes in try/catch so broker outages degrade gracefully instead of throwing into user requests.
- How do I declare exchanges, queues and bindings with this package?
- Declarations go through the manager, which lets you create exchanges with a type and durability flags, declare queues with their arguments, and bind them together using routing keys. Declaring the same topology repeatedly is idempotent in RabbitMQ as long as the arguments match, so it is safe to run on boot. Mismatched arguments against existing topology will cause a channel error, so keep declarations consistent across services. Many teams run declarations in a deploy step or Artisan command rather than on every request.
- How do I consume messages from RabbitMQ in a Laravel application?
- Consumption uses the manager's consumer API, which you typically drive from a long-running Artisan command or a supervised worker process. The consumer calls back into your application code for each delivery, where you acknowledge or reject based on whether processing succeeded. Because this is a blocking loop, run it under Supervisor or your container orchestrator with restart policies. Avoid consuming inside HTTP requests, since the process would tie up a PHP-FPM worker indefinitely.
- Can I use avto-dev/amqp-rabbit-manager as a Laravel queue driver with Horizon?
- No. This package is a direct RabbitMQ manager for declaring topology, publishing and consuming, not a Laravel queue connector, so it does not plug into the Queue facade or Horizon. If you want Laravel jobs dispatched to RabbitMQ you need a dedicated queue driver package instead. Many teams use both: a queue driver for job dispatch and this manager for explicit publish and consume flows and topology management.
- How do I test RabbitMQ integration in CI without a real broker?
- The most reliable approach is to run a RabbitMQ container as a service in CI and exercise declare, publish and consume against it, since the real broker catches topology and argument mismatches that mocks never will. For unit tests, wrap the manager behind your own small interface and swap in a fake so business logic does not depend on a live connection. The package's own test harness runs in Docker, which is a reasonable template for your pipeline. Keep a separate integration suite so the fast unit tests stay fast.
- Is avto-dev/amqp-rabbit-manager actively maintained, and how do I upgrade to v2.12.0?
- Release v2.12.0 landed in the same window as Laravel 13 and moved the framework floor to ^11.0, which indicates the maintainer is tracking Laravel's cadence rather than letting the package drift. Upgrading from a previous minor on Laravel 11 or 12 is a constraint bump plus composer update, with no public API, config key or migration changes implied by the release notes. Note that the PHP 8.5 mention in those notes refers to the Docker dev container, not a consumer runtime requirement, so confirm the PHP floor in composer.json before planning a PHP upgrade alongside it.