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 2020/09/11 22:02:25 UTC

[GitHub] [beam] boyuanzz commented on a change in pull request #12806: [BEAM-10869] Use PubsubMessagePayloadOnlyCoder when writing to Pubsub.

boyuanzz commented on a change in pull request #12806:
URL: https://github.com/apache/beam/pull/12806#discussion_r487310176



##########
File path: sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.java
##########
@@ -1012,6 +1012,8 @@ public PDone expand(PCollection<T> input) {
         case UNBOUNDED:
           return input
               .apply(MapElements.into(new TypeDescriptor<PubsubMessage>() {}).via(getFormatFn()))
+              // TODO(BEAM-10869): Also plump through PubsubMessageWithAttributesCoder if needed.
+              .setCoder(PubsubMessagePayloadOnlyCoder.of())

Review comment:
       I misunderstood what PR12760 does. Can you explain more about "we don't use any of the other attributes from the message"? It seems like both `PubsubMessage` in python and java contain 'attribute' map.




----------------------------------------------------------------
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.

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