Hi, I had a question around approach. We have a s...
# general
j
Hi, I had a question around approach. We have a service (Service A) that sends a message to another service (Service B) via Kafka. Service B packages up the request and then forwards onto another service (Service C). Service A and Service C have a relationship in that the data that gets send from Service A is only read by Service C and an action is performed based upon the contents of that message. My question is whether we ignore Service B and say there is a contract between A & C (where the intent of an action is understood) or I say there is a contract between A&B and then B&C (because the message is generated by one and received by another) or whether there is a contract between A&B and A&C. What would be the suggested approach in this instance? The concern is that because there is a relationship between what is sent by Service A and what is processed by Service C that the importance of the message content would be lost as Service B does not care or know about what it sends to Service C (If I was to adopt the traditional direct service to service approach)
m
Tricky. It sounds a bit like the API gateway use case. You might be able to extrapolate the guidance from that here
Does the structure of the message from A matter to service B? Or does it blindly find it and carry it to Service C? Does it transform the message at all?
If it doesn’t modify things, in that case, you might choose to ignore B altogether (ensuring you have appropriate coverage to ensure that if service B goes out of commission, the scenarios are appropriately tested)
j
Does the structure of the message from A matter to service B? Or does it blindly find it and carry it to Service C? Does it transform the message at all? (edited)
Not really, it just takes the payload and puts a Cloud events wrapper around it and decides where to route it to
🤔 1