Configuration
Installation
composer require ecotone/amqpModule Powered By
Enqueue solid and powerful abstraction over asynchronous queues.
Configuration
In order to use AMQP Support we need to add ConnectionFactory to our Dependency Container.
# config/services.yaml
# You need to have RabbitMQ instance running on your localhost, or change DSN
Enqueue\AmqpExt\AmqpConnectionFactory:
class: Enqueue\AmqpExt\AmqpConnectionFactory
arguments:
- "amqp://guest:guest@localhost:5672//"# Register AMQP Service in Provider
use Enqueue\AmqpExt\AmqpConnectionFactory;
public function register()
{
$this->app->singleton(AmqpConnectionFactory::class, function () {
return new AmqpConnectionFactory("amqp+lib://guest:guest@localhost:5672//");
});
}use Enqueue\AmqpExt\AmqpConnectionFactory;
$application = EcotoneLiteApplication::boostrap(
[
AmqpConnectionFactory::class => new AmqpConnectionFactory("amqp+lib://guest:guest@localhost:5672//")
]
);Last updated
Was this helpful?