mercredi 3 avril 2019

Sequential consumer

scenario

A device (publisher) sends log data to RabbitMQ. Multiple log data microservices (consumers) store the data to SQL Server. After storing the data, an external API must be called to collect extra (metadata) information. This metadata must be stored along with the log data by it's UUID.

question

What would be the best approach to execute a sequential action that requests and stores the metadata along with the log data itself?

the easiest way is to implement the external API call inside the logdata microservice, but this doesn't comply with the SOLID principles. Since it has two responsiblities: storing and requesting metadata.

Aucun commentaire:

Enregistrer un commentaire