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

Beam JIRA Bot commented on BEAM-10113:
--------------------------------------

This issue is P2 but has been unassigned without any comment for 60 days so it 
has been labeled "stale-P2". If this issue is still affecting you, we care! 
Please comment and remove the label. Otherwise, in 14 days the issue will be 
moved to P3.

Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed 
explanation of what these priorities mean.


> PubSubIO readMessagesWithMessageId() breaks the payload encoding when using 
> DataflowRunner
> ------------------------------------------------------------------------------------------
>
>                 Key: BEAM-10113
>                 URL: https://issues.apache.org/jira/browse/BEAM-10113
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-gcp
>    Affects Versions: 2.20.0
>         Environment: Running locally on MacOS Catalina 10.15.4 and as a 
> Dataflow job in GCP.
>            Reporter: Alexander Malyga
>            Priority: P2
>              Labels: GCP, dataflow, pubsubio, runner, stale-P2
>             Fix For: Not applicable
>
>
> My pipeline reads PubSub messages and parses their payload to objects using 
> Gson. I use PubsubIO.readMessagesWithMessageId() to get the PubSub message 
> and the message ID.
> I tested the pipeline thoroughly by running it with the DirectRunner in my 
> local machine and everything works fine, but when running it as a Dataflow 
> job in GCP using the DataflowRunner, Gson can't parse the messages properly 
> because the first character of the payload (opening bracket "{") is missing, 
> this only happens when using the DataflowRunner. 
> I noticed that the problem no longer happens when using 
> PubsubIO.readStrings() instead of PubsubIO.readMessagesWithMessageId() and 
> getting the payload directly (previously I had to decode the payload using 
> new String(element.getPayload(), StandardCharsets.UTF_8); )
>  
>  



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

Reply via email to