This repo sets up two microservices products and catalogs that communicate via and event bus. The product service emits PRODUCT_CREATED and PRODUCT_DELETED events which are consumed by the catalogs service to create and destory catalog records.
- Install docker
- Run
docker-compose up
navigate to http://localhost:4000/products for a list of products
navigate to http://localhost:4001/catalogs for a list of catalogs
- run
./create-product
to create products in the product serice - navigate to http://localhost:4000/products to see the newly created product
- navigate to http://localhost:4001/catalogs to see the newly created catalog
- run
./delete-product [product-id]
to delete product from the product service - navigate to http://localhost:4000/products to see the updated list of products
- navigate to http://localhost:4001/catalogs to see the updated list of catalog