So I’ve got a question -
Consider the following scenario I have a service that aggregates leads, a lead can be a good / goods I can buy and another service for Pricing said goods.
My architecture is following the API gateway pattern, so my services in theory shouldn’t introspect or communicate with one and other.
I’d ideally want this operation to be asynchronous. Being that the leads service inserts into my database and I publish an event called - LeadCreated.
The pricing api consumes that event and emits an event called LeadPriced which obviously in turn contains the pricing information for the lead. The leads service then listens to that event and then appends the pricing information to the lead.
Is this an appropriate way to handle this kind of communication?
Worth noting that each micro services has and is the only thing allowed to communicate with its dataset.
Top comments (0)