Description
The event itself contains all the data the consumer needs. The consumer doesn't need to contact the producer for more info.
Where to use
- High decoupling. \n
- Reducing network chatter.
Real World Example
The 'OrderCreated' event includes the full item list, shipping address, and total amount. The Shipping Service can generate a label without calling the Order API.
Code Example
class Event-CarriedStateTransfer:
def __init__(self):
pass
def execute(self):
print('Executing Event-Carried State Transfer')
