Description
Follow-up from #472 (comment).
From Vikas:
I was wondering though, if we can some how (in future) support versioning of the payload schema. I mean lets say we say it as v1 with our current format and v2 to the new one you proposed @maxceem. Now, to give sufficient time to the event consumers to adapt to the new format, we can raise both events in both formats and then deprecate and finally remove old version after some time.
From Maksym:
I think we would be able to do that after we migrate the
payload
format proposed in this ticket #472 (comment). As soon as we move out actual document data frompayload
to a nested property likedata
ororigin
, we can add additional properties to thepayload
and they would never conflict with the document data. So we can have payload with version like this:
payload: {
version: 2,
data: {},
resource: "project",
newProperty: "..."
}
Theoretically, we could also add
version
outside thepayload
, but it's not supported by the current Topocder Standard for Kafka topics, so we have to keep inside thepayload
.
From Vikas:
I am in favour of this (version outside payload) as it gives the listener opportunity to detect version of the payload without parsing the payload.