You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 12:43:25 UTC

[GitHub] [beam] damccorm opened a new issue, #19679: PubsubIO.readStrings() and DataflowRunner

damccorm opened a new issue, #19679:
URL: https://github.com/apache/beam/issues/19679

   Hi all,
   
   I have a potential issue I am debugging with `org.apache.beam.sdk.io.gcp.pubsub`. When using the GCP PubSub service no messages are received on the DirectRunner or the DataflowRunner when using PubsubIO.readStrings(). When using the DirectRunner and the Pubsub Emulator it works correctly locally.
   
   I have been working with this issue for the past few days and believe it may be related to the PubsubIO library.
   
    
   
   I am listening to a topic (also tried a subscription) using:
   ```
   
   PubsubIO.Read<String> read = PubsubIO
       .readStrings()
       .withTimestampAttribute("timestamp")
   
      .fromTopic(options.getTopic());
   ```
   
    
   
   Alternatively this method works:
   ```
   
   PubsubIO.Read<PubsubMessage> read = PubsubIO
       .readMessagesWithAttributes()
       .withTimestampAttribute("timestamp")
   
      .fromTopic(options.getTopic()); 
   ```
   
   The code works perfectly with the Pubsub Emulator using readStrings() and after switching to readMessagesWithAttributes() everything works correctly on both the emulator as well as GCP.
   
    
   
   I am using Beam "2.13.0" with "beam-runners-google-cloud-dataflow-java" with Java 8. 
   
   My "gcloud" versions:
   
   Google Cloud SDK 256.0.0
    beta 2019.05.17
    bigtable
    bq 2.0.46
    core 2019.07.26
    gsutil 4.41
    pubsub-emulator 2019.04.26 
   
   Imported from Jira [BEAM-7851](https://issues.apache.org/jira/browse/BEAM-7851). Original Jira may contain additional context.
   Reported by: gregorskii.


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org