Skip to content

Support "version" for Kafka event payloads #476

Open
@maxceem

Description

@maxceem

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 from payload to a nested property like data or origin, we can add additional properties to the payload 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 the payload, but it's not supported by the current Topocder Standard for Kafka topics, so we have to keep inside the payload.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions