sjvanrossum commented on code in PR #31608: URL: https://github.com/apache/beam/pull/31608#discussion_r2065635590
########## sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubWriteIT.java: ########## @@ -102,4 +109,55 @@ public void testBoundedWriteMessageWithAttributes() { .apply(PubsubIO.writeMessages().to(testTopic.getPath())); pipeline.run(); } + + @Test + public void testBoundedWriteMessageWithAttributesAndMessageIdAndOrderingKey() throws IOException { + TopicPath testTopicPath = + PubsubClient.topicPathFromName( + project, "pubsub-write-ordering-key-" + Instant.now().getMillis()); + pubsubClient.createTopic(testTopicPath); + SubscriptionPath testSubscriptionPath = + pubsubClient.createRandomSubscription( + PubsubClient.projectPathFromId(project), testTopicPath, 10); + + byte[] payload = RandomStringUtils.randomAscii(1_000_000).getBytes(StandardCharsets.UTF_8); + Map<String, String> attributes = + ImmutableMap.<String, String>builder() + .put("id", "1") + .put("description", RandomStringUtils.randomAscii(100)) + .build(); + + PubsubMessage outgoingMessage = + new PubsubMessage(payload, attributes, "test_message", "111222"); Review Comment: Addressed by 5057399 (patched by e69aae1 and 05369b9). -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org