catalogVersion
is CATALOG_V1
:
catalogVersion
is CATALOG_V3
:
On every change in catalog V1 and in catalog V3 we send relevant events.
To ensure smooth client migration from V1 to V3 until client started listening to V3 domain events, on every change in V3 catalog we also send duplicating V1 webhook.
But once client started migration to V3 catalog and listening to V3 event in addition to V1 event it would cause double event handling issue. To avoid this, we added a new field originatedFromVersion
to all V1 webhooks. The client should check this field and ignore the V1 webhook if the originatedFromVersion
is CATALOG_V3
.
Let's consider example where you need to listen to Product Created event and save new product on your DB.
createdEvent.entityAsJson
. Just save it in your DB or do whatever logic you need.originatedFromVersion
field.
originatedFromVersion
is CATALOG_V3
you can ignore this event.