We have an application which has UI component written in React and service A which holds transactions for each day. As of today, the UI application invokes a REST API on service A to get transactions data and display on UI. UI layer does not owns any business logic, all business logic is in service A.
Now we have a change upcoming where in we have to fetch data from service B, which holds the inventory details for each store, and this data also needs to be displayed on UI. Service B currently publishes inventory details every 3 hours on a Kafka topic.
So one of the proposed designs is this: Service A consume the inventory details from the Kafka topic (which service B is publishing) and store a local copy in its database, and update it every day and expose a REST API to display the data on UI. In my personal opinion, in this case service A just becomes a pass through of data that service B owns/publishes, we do not have any business logic we need to apply we don't produce this data.
Other design option is we force service B to expose a REST endpoint to expose the data.
I'm a bit confused on what should be the right approach here? looking for some pointers.