algorithms – Aggregation of data from two microservices

There is no good way to do that. Since your data is spread over several microservices, you must join them manually. So, there must be a piece of code like:

def find_unconfigured_users ():
for the user in B.all_users ():
if A. a_configured_user (user):
give in to the user

This will be tedious and slow, but because you use microservices, you do not have the reasonable choice. (The unreasonable choice would be to access B's data directly, without going through the microservice interface.)

The place where this feature should live depends … eventually, this should be part of the Microservice A itself, that is, the service that processes the configured users.

When the data is divided in this way on several microservices, this may be a necessary evil or an indication of a more serious problem. Domain-Driven Design has the concept of a delimited context – an autonomous part of the problematic domain that your software system tries to solve. A limited context must not be divided between several microservices!

You might want to check which context related aspects of a user belong to. Why do I have to deal with configured and unconfigured users, and why is it different from users in general? It is legitimate for different delimited contexts to have different but related user concepts, but you need to specify their relationship. Here, it seems that a user entity is actually shared in different contexts, which poses a problem. The solution might be to include the configuration of a user in the main user context (B).

"The schema is corrected" is not necessarily a well reason to avoid doing so, but maybe can not be influenced by you. No technological solution will be able to solve organizational malfunctions – especially microservices. You will then have to resort to tedious checking of each user, as in the code snippet above.