Reputation: 17
I'm working for a project which has multiple microservices. For Ex: AuthenticationService (Only to get authentication token), UserService(Get All Users with token), InventoryService(To get the inventory data with token) etc. GraphQL API Gateway is used to get the token or inventory. Now when i want to get the list of the inventory which is based on user then i'm not sure that whether i should use RabbitMQ or Axios API Call. I'm sharing 3 diagrams. Please help to get the some clarity.
Upvotes: 0
Views: 1137
Reputation: 303
I personally used image one in our project, because for contacting internally you don't need to pass requests through the gateway. use the api gateway as an endpoint of your application.
I recommend using @golevelup/nestjs-rabbitmq
npm package because it is easy to use.
if it is useful plz vote up :)
Upvotes: 1