You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/08/22 18:41:07 UTC

[GitHub] [beam] egalpin commented on a diff in pull request #22216: BEAM-13592 Add getOrderingKey in o.a.b.sdk.io.gcp.pubsub.PubsubMessage

egalpin commented on code in PR #22216:
URL: https://github.com/apache/beam/pull/22216#discussion_r951783486


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubCoderProviderRegistrar.java:
##########
@@ -37,6 +37,7 @@ public List<CoderProvider> getCoderProviders() {
             TypeDescriptor.of(PubsubMessage.class), PubsubMessageWithMessageIdCoder.of()),
         CoderProviders.forCoder(
             TypeDescriptor.of(PubsubMessage.class),
-            PubsubMessageWithAttributesAndMessageIdCoder.of()));
+            PubsubMessageWithAttributesAndMessageIdCoder.of()),
+        CoderProviders.forCoder(TypeDescriptor.of(PubsubMessage.class), PubsubMessageCoder.of()));

Review Comment:
   @TheNeuralBit I think this is the area where there is lack of clarity.  As best as I can tell, here there are multiple coders registered for the same class (`PubsubMessage.class`).  It seems like order matters here, but I'm not sure all the implications.  Ex. if I put the new coder first in the registrar, existing pubsub unit tests will fail with coder errors.



-- 
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-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org