Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-2982

PubSubIO.readMessages().fromSubscription(...) doesn't work with ValueProvider

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0
    • Component/s: io-java-gcp
    • Labels:
      None

      Description

      Originally reported on Stack Overflow:

      https://stackoverflow.com/questions/46360584/apache-beam-template-runtime-context-error

      In the `PubsubUnboundedSource#expand` method we create the PubsubSource:

      https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubUnboundedSource.java#L1399

      Creating the PubsubSource calls `getSubscription` which attempts to get the value out of a value provider.

      To support templatization, the PubsubSource needs to take the ValueProvider, and only get the subscription out at pipeline execution time.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tgroh Thomas Groh
                Reporter:
                bchambers Ben Chambers
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: