[ 
https://issues.apache.org/jira/browse/BEAM-3489?focusedWorklogId=440474&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-440474
 ]

ASF GitHub Bot logged work on BEAM-3489:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Jun/20 21:54
            Start Date: 02/Jun/20 21:54
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #11873:
URL: https://github.com/apache/beam/pull/11873#discussion_r434197026



##########
File path: 
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java
##########
@@ -1353,14 +1353,14 @@ public void translate(StreamingPubsubIORead transform, 
TranslationContext contex
             PropertyNames.PUBSUB_ID_ATTRIBUTE, 
overriddenTransform.getIdAttribute());
       }
       // In both cases, the transform needs to read PubsubMessage. However, in 
case it needs
-      // the attributes, we supply an identity "parse fn" so the worker will 
read PubsubMessage's
-      // from Windmill and simply pass them around; and in case it doesn't 
need attributes,
-      // we're already implicitly using a "Coder" that interprets the data as 
a PubsubMessage's
-      // payload.
-      if (overriddenTransform.getNeedsAttributes()) {
+      // the attributes or messageId, we supply an identity "parse fn" so the 
worker will
+      // read PubsubMessage's from Windmill and simply pass them around; and 
in case it
+      // doesn't need attributes, we're already implicitly using a "Coder" 
that interprets
+      // the data as a PubsubMessage's payload.
+      if (overriddenTransform.getNeedsAttributes() | 
overriddenTransform.getNeedsMessageId()) {

Review comment:
       Other then this change, this  looks good to me. We'll see what the tests 
have to say.




----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 440474)
    Time Spent: 9h 10m  (was: 9h)

> Expose the message id of received messages within PubsubMessage
> ---------------------------------------------------------------
>
>                 Key: BEAM-3489
>                 URL: https://issues.apache.org/jira/browse/BEAM-3489
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-java-gcp
>            Reporter: Luke Cwik
>            Assignee: Thinh Ha
>            Priority: P3
>              Labels: newbie, starter
>          Time Spent: 9h 10m
>  Remaining Estimate: 0h
>
> This task is about passing forward the message id from the pubsub proto to 
> the java PubsubMessage.
> Add a message id field to PubsubMessage.
> Update the coder for PubsubMessage to encode the message id.
> Update the translation from the Pubsub proto message to the Dataflow message:
> https://github.com/apache/beam/blob/2e275264b21db45787833502e5e42907b05e28b8/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubUnboundedSource.java#L976



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to