[
https://issues.apache.org/jira/browse/BEAM-3489?focusedWorklogId=238155&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-238155
]
ASF GitHub Bot logged work on BEAM-3489:
----------------------------------------
Author: ASF GitHub Bot
Created on: 06/May/19 21:36
Start Date: 06/May/19 21:36
Worklog Time Spent: 10m
Work Description: lukecwik commented on pull request #8370: [BEAM-3489]
add PubSub messageId in PubsubMessage
URL: https://github.com/apache/beam/pull/8370#discussion_r281372917
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubMessage.java
##########
@@ -23,17 +23,25 @@
import javax.annotation.Nullable;
/**
- * Class representing a Pub/Sub message. Each message contains a single
message payload and a map of
- * attached attributes.
+ * Class representing a Pub/Sub message. Each message contains a single
message payload, a map of
+ * attached attributes, and an optional messageId.
*/
public class PubsubMessage {
private byte[] message;
private Map<String, String> attributes;
+ private String messageId;
public PubsubMessage(byte[] payload, Map<String, String> attributes) {
this.message = payload;
this.attributes = attributes;
+ this.messageId = "";
Review comment:
I think you should set this to null.
----------------------------------------------------------------
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: 238155)
Time Spent: 50m (was: 40m)
> 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: 50m
> 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.3#76005)