Naman-Katiyar commented on PR #41328: URL: https://github.com/apache/beam/pull/41328#issuecomment-6890489031
Thank you for the review — both points are addressed in this rework: - Wrong sink: I have reverted the PubsubSink change entirely, and moved the fix to `PubsubIO.Write.PubsubBoundedWriter`. It now passes `getIdAttribute()` to the Pub/Sub client in `startBundle` and supplies a record id in `processElement`. - Deterministic id: you are right that `UUID.nameUUIDFromBytes` would give identical payloads identical ids, risking silent deduplication. The bounded writer now generates a fresh per-element `UUID.randomUUID()` whenever a message lacks the configured id attribute, and keeps any id the message already carries. The tests have moved with the fix: the PubsubSinkTest additions are removed, and PubsubIOTest now has a capturing-client test for the batch writer covering fresh, distinct ids for two identical-payload elements and preservation of an existing id. @damccorm — could you please take another look when you have a chance? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
