I plan to use the Microservice architecture for the project. The selected .NET Core technology stack with Docker and RabbitMQ as a simple service bus, and this should be deployable on Linux .
Suppose I have a Payment service and an Order service, I want each of these services to open REST . Because of this, I was thinking about these two services being .NET Core Web APIs .
But the problem is inter-service communication using RabbitMQ . Whenever I receive a new Order , I want to publish an event using RabbitMQ , and then listen to this event in the Payment service to perform certain operations (database updates). But since these are Web APIs , I don’t think you can listen to events as I described. (I feel that I may have to use something like a console application to subscribe to events.)
I would like to find the most effective method to achieve this, using best practices, given the scalability and extensibility of the system.
source share