quarks-tech/protoevent-amqp-php

0.1.0 2024-04-25 12:34 UTC

This package is auto-updated.

Last update: 2024-10-25 14:04:56 UTC


README

  1. Install dependencies:

    composer install --ignore-platform-reqs
  2. Builder php docker image: PHP 8.1 with all the required extensions

    make install-builder
  3. Update the demo/config.php file: make sure these credentials match with your local rabbitmq setup

    'rabbitmq' => [
        'host' => getenv('DOCKER_INTERNAL_HOST'),
        'port' => '5672',
        'vhost' => '/',
        'login' => 'guest',
        'password' => 'guest',
    ]
  4. Create rabbitmq exchange example.books.v1

  5. Start the receiver: The receiver will create the example.consumers.v1 queue, bind itself to the BookCreatedEvent, and start listening to events to process them.

    make demo-consume
  6. Publish an event: The BookCreatedEvent will be published on to example.books.v1 exchange

    make demo-publish