I'm modeling messages to be used in an integration among microservices. Did You ever seen a design pattern specific for messages?
For example, in message bellow , how could I represent if child with ID F123 was deleted?
There's a little trap, because I could send delete event from entity Son but in this case I just want kill the relationship between entity Father x entity Son. So, My event is an update in entity Father to delete the relationship with entity Son.
The consumer could do a diff between message and local data, but comparing every message with high data volumes could be very expensive.
{
"header":{
"op":"updated_father"
},
"body":{
"id":"1234",
"entity_type":"father",
"childs":[
{
"child":{
"id":"f123",
"entity_type":"son"
}
},
{
"child":{
"id":"f333",
"entity_type":"son"
}
}
]
}
}
thanks all!
Aucun commentaire:
Enregistrer un commentaire