quarks-tech / protoevent-amqp-php
Installs: 3 072
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/quarks-tech/protoevent-amqp-php
Requires
- php: >=8
- ext-amqp: 1.11.0
- ext-bcmath: *
- ext-pcntl: *
- quarks-tech/protoevent-php: ~0.1.0
Requires (Dev)
- phpunit/phpunit: ^9
- symfony/event-dispatcher: ^7.0
README
-
Install dependencies:
composer install --ignore-platform-reqs
-
Builder php docker image: PHP 8.1 with all the required extensions
make install-builder
-
Update the
demo/config.phpfile: make sure these credentials match with your local rabbitmq setup'rabbitmq' => [ 'host' => getenv('DOCKER_INTERNAL_HOST'), 'port' => '5672', 'vhost' => '/', 'login' => 'guest', 'password' => 'guest', ]
-
Create rabbitmq exchange
example.books.v1 -
Start the receiver: The receiver will create the
example.consumers.v1queue, bind itself to theBookCreatedEvent, and start listening to events to process them.make demo-consume
-
Publish an event: The
BookCreatedEventwill be published on toexample.books.v1exchangemake demo-publish