apilloud commented on code in PR #24887:
URL: https://github.com/apache/beam/pull/24887#discussion_r1061964917
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubMessageWithAttributesAndMessageIdAndOrderingKeyCoder.java:
##########
@@ -42,8 +42,9 @@
// A message's attributes can be null.
private static final Coder<Map<String, String>> ATTRIBUTES_CODER =
NullableCoder.of(MapCoder.of(StringUtf8Coder.of(),
StringUtf8Coder.of()));
- // A message's messageId cannot be null
- private static final Coder<String> MESSAGE_ID_CODER = StringUtf8Coder.of();
+ // A message's messageId can only be null when the message is an outgoing
message (i.e. to be
+ // published). Incoming messages will always have a non-null messageId
+ private static final Coder<String> MESSAGE_ID_CODER =
NullableCoder.of(StringUtf8Coder.of());
Review Comment:
This is a breaking change as it adds a byte to the encoded message. Why is
it needed?
--
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]