ahmedabu98 commented on code in PR #31608:
URL: https://github.com/apache/beam/pull/31608#discussion_r1761011431
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PreparePubsubWriteDoFn.java:
##########
@@ -193,16 +190,6 @@ public void process(
.add("pubsub", "topic",
PubsubClient.topicPathFromPath(topic).getDataCatalogSegments());
reportedLineage = topic;
}
- // TODO: Remove this check once Dataflow's native sink supports ordering
keys.
- if (!allowOrderingKey && !Strings.isNullOrEmpty(message.getOrderingKey()))
{
Review Comment:
> We could clear the ordering key in this case so that we don't affect
batching of publishing unnecessarily
Good call. I think clearing the ordering key would require us to reconstruct
the whole pubsub message which may be a lil costly. Instead, I set a default
empty string during batching when `withOrderingKeys()` is not set.
--
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]