I want to know that further details about payloads in an event-driven architecture. I used several online resources and didn't get many details. Please help me to find,

  1. Use of the Full Payload.
  2. Provide Metadata and an API link with a token to access the Actual Payload, than sending the full data.

1 Answers

0
techagrammer On

To Answer your question api link rather than full data lets take a sample:

In Amazon , Order Microservice sends a event OrderCancelled and Customer service listen to that event.

Now there could be two ways of sending the event data:

  1. Send complete order data in the Event

Pros:Listener services do not need to query Order Service for their functioning.

Cons: Lots of data will be passed in the event even though only 10 % is used.Lots of I/O.

  1. Send only order id, cancel reason , customer id , date in the event

Pros: If data choosen carefully very less data is flown in the event. Cons: If data choosen incorrectly then lots of API requests.