Reputation: 580
I'm designing an event-based system that involves two services, A and B.
When a user updates a resource in service A using a PUT, that service will send a notification onto a message queue. Service B reads from that queue, and then must update the state of one of its resources based on the change that occurred to the resource in A.
As I see it, there are two ways to handle this:
Which method do you all find more agreeable? I lean towards #1 due to the receiver of the message not needing to possibly have out-of-band knowledge of service B (yes, it has a link but it might not have the correct headers, the correct HTTP verb, etc), and to reduce the amount of service chatter.
Any ideas would be appreciated!
Upvotes: 1
Views: 712
Reputation: 10707
Both are viable options. Which version you choose depends on multiple things.
Upvotes: 1