Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-1531

Expose original value for PK updates

    Details

      Description

      When a record's primary key changes, Debezium will represent this as two events in the change stream: a DELETE with the old key and and INSERT with the new key. For consumers there is no way to correlate these two messages, which for instance is a problem when associating additional data with a record based on its primary key; when processing the INSERT, a consumer has no chance to find any data associated earlier on using the old primary key.

      A solution would be to expose the original PK value in the INSERT event and the new PK value in the DELETE event. This could for instance be done using message headers.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rkerner René Kerner
                  Reporter:
                  gunnar.morling Gunnar Morling
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: