Skip to content

Conversation

@SumitKumar-17
Copy link

Updated the custom destination tutorial to clearly explain the roles of write_table_rows and write_events, and added examples showing how different Event types are handled.

@SumitKumar-17 SumitKumar-17 requested a review from a team as a code owner December 3, 2025 09:04
Copy link
Contributor

@iambriccardo iambriccardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Event::Delete(delete) => {
// Handle delete: delete.old_table_row identifies row to remove
}
Event::Commit(_) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Begin and Commit messages, it's a bit of a tricky discussion since those are delivered but they can be duplicate since we don't have the rel_ids on those.

We are currently sending them just to make it clear when transactions start and end, but the destination will have to do some lsn checks to make sure that they are not re-processed.

Maybe we should mention this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay ,I’ll add a note explaining that Begin and Commit events can be duplicated

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated it!

@SumitKumar-17 SumitKumar-17 force-pushed the docs/custom-destination-clarity branch from a1aec74 to 4eda055 Compare December 3, 2025 09:25
///
/// This method handles real-time changes from the Postgres replication stream.
/// Events include inserts, updates, deletes, and transaction boundaries. The
/// destination should process events in order, this is required to maintain data consistency.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another detail, the events from write_events can belong to different tables, the consistency must be maintained within events of the same table but events on separate tables can be applied in any order.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added it!

@SumitKumar-17 SumitKumar-17 force-pushed the docs/custom-destination-clarity branch from 4eda055 to b6c4b47 Compare December 3, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants