lizards-and-pumpkins/lib-queue-backend-amqp

Lizards & Pumpkins AMQP Queue

This package's canonical repository appears to be gone and the package has been frozen as a result.

4.0.0 2022-11-28 21:58 UTC

This package is auto-updated.

Last update: 2024-01-18 15:20:53 UTC


README

Scrutinizer Code Quality Code Coverage Build Status

Lizards & Pumpkins AMQP Queue Library

Setup Steps

  1. Add project dependency: composer require lizards-and-pumpkins/lib-queue-backend-amqp dev-master

  2. Install RabbitMQ: e.g. sudo apt-get install rabbitmq-server

  3. Configure the access credentials in the environment (where ever you set your other Lizards & Pumpkins settings)

         # insecure default example access credentials: 
         export LP_AMQP_HOST="localhost"
         export LP_AMQP_PORT="5672"
         export LP_AMQP_USERNAME="guest"
         export LP_AMQP_PASSWORD="guest"
         export LP_AMQP_VHOST="/"
  4. Add the same config settings to your www NGINX or Apache config

        # insecure default example access credentials:
        fastcgi_param LP_AMQP_HOST "localhost";
        fastcgi_param LP_AMQP_PORT "5672";
        fastcgi_param LP_AMQP_USERNAME "guest";
        fastcgi_param LP_AMQP_PASSWORD "guest";
        fastcgi_param LP_AMQP_VHOST "/";
  5. Register the AmqpFactory with the MasterFactory instance, for example using the factory registration callback:

        public function factoryRegistrationCallback(MasterFactory $masterFactory)
        {
            $masterFactory->register(new \LizardsAndPumpkins\Messaging\Queue\Amqp\AmqpFactory());
        }

Please be aware that in order to run RabbitMQ in production proper security measures have to be put in place, but that is out of the scope of this document.
Please refer to the access control and TLS RabbitMQ documentation for further information.