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

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

                Author: ASF GitHub Bot
            Created on: 17/Aug/19 20:57
            Start Date: 17/Aug/19 20:57
    Worklog Time Spent: 10m 
      Work Description: thinhha commented on pull request #8370: [BEAM-3489] 
add PubSub messageId in PubsubMessage
URL: https://github.com/apache/beam/pull/8370#discussion_r314959366
 
 

 ##########
 File path: 
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubReadIT.java
 ##########
 @@ -61,4 +62,35 @@ public void testReadPublicData() throws Exception {
       // noop
     }
   }
+
+  @Test
+  public void testReadPubsubMessageId() throws Exception {
+    // The pipeline will never terminate on its own
+    pipeline.getOptions().as(DirectOptions.class).setBlockOnRun(false);
+
+    PCollection<PubsubMessage> messages =
+        pipeline.apply(
+            PubsubIO.readMessagesWithMessageId()
+                
.fromTopic("projects/pubsub-public-data/topics/taxirides-realtime"));
+
+    messages.apply(
+        "isMessageIdNonNull",
+        signal.signalSuccessWhen(
+            messages.getCoder(),
+            pubsubMessages ->
+                pubsubMessages.stream().noneMatch(m -> 
Strings.isNullOrEmpty(m.getMessageId()))));
 
 Review comment:
   Looks like the IT passed this time. Could you take another look?
   
   Thanks!
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 296840)
    Time Spent: 7h 40m  (was: 7.5h)

> 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: Minor
>              Labels: newbie, starter
>          Time Spent: 7h 40m
>  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
(v7.6.14#76016)

Reply via email to