07. Use Bidirectional Event Streams with the Checkout App
Date: 2025-02-28
Status
Accepted
Context
We need to communicate with the checkout app to send notifications (not relevant for checkout engine) and receive commands that are not fiscally relevant. The checkout app is a separate service that is responsible for managing the checkout process. It is used by cashiers to process payments and manage the checkout process.
The service must have a bidirectional event stream to communicate with the checkout app. We need to be able to send notifications to the checkout app and receive commands from it.
Decision
We have decided to use gRPC bidirectional streaming to communicate with the checkout app. This will allow us to send notifications to the checkout app and receive commands from it.
Consequences
We will be able to send notifications to the checkout app and receive commands from it using gRPC bidirectional streaming. The overhead on checkout engine will be minimal as it will only need to process the messages that are relevant to it.