You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Ilya Ganelin (JIRA)" <ji...@apache.org> on 2016/07/11 21:16:11 UTC

[jira] [Comment Edited] (BEAM-404) PubsubIO should have a mode that supports maintaining message attributes.

    [ https://issues.apache.org/jira/browse/BEAM-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15371631#comment-15371631 ] 

Ilya Ganelin edited comment on BEAM-404 at 7/11/16 9:15 PM:
------------------------------------------------------------

[~dhalperi@google.com] What would this look like? At the moment there seem to be two method types for "Read":

{code}   
public static Bound<String> topic(String topic) {
      return new Bound<>(DEFAULT_PUBSUB_CODER).topic(topic);
}
{code}

and 

{code}
public Bound<T> topic(String topic) {
        return new Bound<>(name, subscription, PubsubTopic.fromPath(topic), timestampLabel, coder, idLabel, maxNumRecords, maxReadTime);
}
{code}

Is the ask in this PR to make something like 
{code}
public Bound<T> topic(String topic, Metadata metadata) {
        return new Bound<>(DEFAULT_PUBSUB_CODER).topic(topic).metadata(metadata);
}
{code}

Is there a particular kind of Metadata you had in mind?


was (Author: ilganeli):
[~dhalperi@google.com] What would this look like? At the moment there seem to be two method types for "Read":

{code}   
public static Bound<String> topic(String topic) {
      return new Bound<>(DEFAULT_PUBSUB_CODER).topic(topic);
}
{code}

> PubsubIO should have a mode that supports maintaining message attributes.
> -------------------------------------------------------------------------
>
>                 Key: BEAM-404
>                 URL: https://issues.apache.org/jira/browse/BEAM-404
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-gcp
>            Reporter: Daniel Halperin
>
> Right now, PubsubIO only lets uses access the message payload, decoded with the user-provided coder.
> We should add a mode in which the source can return a message with the metadata (attributes) as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)