quarks-tech / protoevent-amqp-php
Installs: 1 930
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
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.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', ]
-
Create rabbitmq exchange
example.books.v1
-
Start the receiver: The receiver will create the
example.consumers.v1
queue, bind itself to theBookCreatedEvent
, and start listening to events to process them.make demo-consume
-
Publish an event: The
BookCreatedEvent
will be published on toexample.books.v1
exchangemake demo-publish