https://github.com/jafaripur/php-microservice
Microservice server app structure with client for calling each other.
https://github.com/jafaripur/php-microservice
amqp message-bus message-queue microservice php queue rabbitmq
Last synced: 12 months ago
JSON representation
Microservice server app structure with client for calling each other.
- Host: GitHub
- URL: https://github.com/jafaripur/php-microservice
- Owner: jafaripur
- License: mit
- Created: 2022-01-22T11:11:13.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-18T11:27:34.000Z (over 3 years ago)
- Last Synced: 2025-02-06T09:35:59.173Z (about 1 year ago)
- Topics: amqp, message-bus, message-queue, microservice, php, queue, rabbitmq
- Language: PHP
- Homepage:
- Size: 156 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# MicroService Server & Client

[](https://php-microservice.readthedocs.io/en/latest/?badge=latest)
Standalone package to implement messaging between microservices nodes in PHP with both server and client.
Server consumers listen to receive message and process, client pushing data to message queue to server consumers grab and process.
## Features
- Use PHP AMQP extension and change to Bunny library if `ext-amqp` not installed.
- PSR-3 compatible logging system.
- PSR-11 compatible service container for dependecy injection on processor file.
- Define processor class for responding to client calling methods.
- Define consumer class and attach processors for it for starting consuming.
- Async command sending.
- Each microservice could be a server or client and can talk to each other.
- Client for sending messages to queue.
## Installation
The preferred way to install this package is through composer:
```bash
composer require jafaripur/php-microservice
```
## Documentation
For more details, see full document [http://php-microservice.readthedocs.io/](http://php-microservice.readthedocs.io/).
## Test
```sh
# Run test
docker-compose up --build --exit-code-from micro micro
# Stop and remove created containers
docker-compose down
```