blob: 26c0c78e6fe53ef0cf00c5f7f359f515c78e2e1d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181-google-v7) on Mon Jan 27 16:42:31 PST 2020 -->
<title>PubsubIO.Read (Apache Beam 2.20.0-SNAPSHOT)</title>
<meta name="date" content="2020-01-27">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PubsubIO.Read (Apache Beam 2.20.0-SNAPSHOT)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.PubsubTopic.html" title="class in org.apache.beam.sdk.io.gcp.pubsub"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.External.html" title="class in org.apache.beam.sdk.io.gcp.pubsub"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" target="_top">Frames</a></li>
<li><a href="PubsubIO.Read.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#fields.inherited.from.class.org.apache.beam.sdk.transforms.PTransform">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.beam.sdk.io.gcp.pubsub</div>
<h2 title="Class PubsubIO.Read" class="title">Class PubsubIO.Read&lt;T&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">org.apache.beam.sdk.transforms.PTransform</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/values/PBegin.html" title="class in org.apache.beam.sdk.values">PBegin</a>,<a href="../../../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</li>
<li>
<ul class="inheritance">
<li>org.apache.beam.sdk.io.gcp.pubsub.PubsubIO.Read&lt;T&gt;</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, <a href="../../../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html" title="interface in org.apache.beam.sdk.transforms.display">HasDisplayData</a></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO</a></dd>
</dl>
<hr>
<br>
<pre>public abstract static class <span class="typeNameLabel">PubsubIO.Read&lt;T&gt;</span>
extends <a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/values/PBegin.html" title="class in org.apache.beam.sdk.values">PBegin</a>,<a href="../../../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</pre>
<div class="block">Implementation of <a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.html#read--"><code>PubsubIO.read()</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../serialized-form.html#org.apache.beam.sdk.io.gcp.pubsub.PubsubIO.Read">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.External.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read.External</a></span></code>
<div class="block">Exposes <code>PubSubIO.Read</code> as an external transform for cross-language usage.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.beam.sdk.transforms.PTransform">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.beam.sdk.transforms.<a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a></h3>
<code><a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#name">name</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#Read--">Read</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#expand-org.apache.beam.sdk.values.PBegin-">expand</a></span>(<a href="../../../../../../../org/apache/beam/sdk/values/PBegin.html" title="class in org.apache.beam.sdk.values">PBegin</a>&nbsp;input)</code>
<div class="block">Override this method to specify how this <code>PTransform</code> should be expanded on the given
<code>InputT</code>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#fromSubscription-java.lang.String-">fromSubscription</a></span>(java.lang.String&nbsp;subscription)</code>
<div class="block">Reads from the given subscription.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#fromSubscription-org.apache.beam.sdk.options.ValueProvider-">fromSubscription</a></span>(<a href="../../../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a>&lt;java.lang.String&gt;&nbsp;subscription)</code>
<div class="block">Like <code>subscription()</code> but with a <a href="../../../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options"><code>ValueProvider</code></a>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#fromTopic-java.lang.String-">fromTopic</a></span>(java.lang.String&nbsp;topic)</code>
<div class="block">Creates and returns a transform for reading from a Cloud Pub/Sub topic.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#fromTopic-org.apache.beam.sdk.options.ValueProvider-">fromTopic</a></span>(<a href="../../../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a>&lt;java.lang.String&gt;&nbsp;topic)</code>
<div class="block">Like <code>topic()</code> but with a <a href="../../../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options"><code>ValueProvider</code></a>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">populateDisplayData</a></span>(<a href="../../../../../../../org/apache/beam/sdk/transforms/display/DisplayData.Builder.html" title="interface in org.apache.beam.sdk.transforms.display">DisplayData.Builder</a>&nbsp;builder)</code>
<div class="block">Register display data for the given transform or component.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#withClientFactory-org.apache.beam.sdk.io.gcp.pubsub.PubsubClient.PubsubClientFactory-">withClientFactory</a></span>(<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubClient.PubsubClientFactory.html" title="interface in org.apache.beam.sdk.io.gcp.pubsub">PubsubClient.PubsubClientFactory</a>&nbsp;factory)</code>
<div class="block">The default client to write to Pub/Sub is the <a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubJsonClient.html" title="class in org.apache.beam.sdk.io.gcp.pubsub"><code>PubsubJsonClient</code></a>, created by the <code>PubsubJsonClient.PubsubJsonClientFactory</code>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#withCoderAndParseFn-org.apache.beam.sdk.coders.Coder-org.apache.beam.sdk.transforms.SimpleFunction-">withCoderAndParseFn</a></span>(<a href="../../../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;coder,
<a href="../../../../../../../org/apache/beam/sdk/transforms/SimpleFunction.html" title="class in org.apache.beam.sdk.transforms">SimpleFunction</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubMessage.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubMessage</a>,<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;parseFn)</code>
<div class="block">Causes the source to return a PubsubMessage that includes Pubsub attributes, and uses the
given parsing function to transform the PubsubMessage into an output type.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#withIdAttribute-java.lang.String-">withIdAttribute</a></span>(java.lang.String&nbsp;idAttribute)</code>
<div class="block">When reading from Cloud Pub/Sub where unique record identifiers are provided as Pub/Sub
message attributes, specifies the name of the attribute containing the unique identifier.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#withTimestampAttribute-java.lang.String-">withTimestampAttribute</a></span>(java.lang.String&nbsp;timestampAttribute)</code>
<div class="block">When reading from Cloud Pub/Sub where record timestamps are provided as Pub/Sub message
attributes, specifies the name of the attribute that contains the timestamp.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.beam.sdk.transforms.PTransform">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.beam.sdk.transforms.<a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a></h3>
<code><a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#compose-org.apache.beam.sdk.transforms.SerializableFunction-">compose</a>, <a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#compose-java.lang.String-org.apache.beam.sdk.transforms.SerializableFunction-">compose</a>, <a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#getAdditionalInputs--">getAdditionalInputs</a>, <a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#getDefaultOutputCoder--">getDefaultOutputCoder</a>, <a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#getDefaultOutputCoder-InputT-">getDefaultOutputCoder</a>, <a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#getDefaultOutputCoder-InputT-org.apache.beam.sdk.values.PCollection-">getDefaultOutputCoder</a>, <a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#getKindString--">getKindString</a>, <a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#getName--">getName</a>, <a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#toString--">toString</a>, <a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#validate-org.apache.beam.sdk.options.PipelineOptions-">validate</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Read--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Read</h4>
<pre>public&nbsp;Read()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="fromSubscription-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fromSubscription</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;fromSubscription(java.lang.String&nbsp;subscription)</pre>
<div class="block">Reads from the given subscription.
<p>See <a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.PubsubSubscription.html#fromPath-java.lang.String-"><code>PubsubIO.PubsubSubscription.fromPath(String)</code></a> for more details on the format of
the <code>subscription</code> string.
<p>Multiple readers reading from the same subscription will each receive some arbitrary
portion of the data. Most likely, separate readers should use their own subscriptions.</div>
</li>
</ul>
<a name="fromSubscription-org.apache.beam.sdk.options.ValueProvider-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fromSubscription</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;fromSubscription(<a href="../../../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a>&lt;java.lang.String&gt;&nbsp;subscription)</pre>
<div class="block">Like <code>subscription()</code> but with a <a href="../../../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options"><code>ValueProvider</code></a>.</div>
</li>
</ul>
<a name="fromTopic-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fromTopic</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;fromTopic(java.lang.String&nbsp;topic)</pre>
<div class="block">Creates and returns a transform for reading from a Cloud Pub/Sub topic. Mutually exclusive
with <a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html#fromSubscription-java.lang.String-"><code>fromSubscription(String)</code></a>.
<p>See <a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.PubsubTopic.html#fromPath-java.lang.String-"><code>PubsubIO.PubsubTopic.fromPath(String)</code></a> for more details on the format of the
<code>topic</code> string.
<p>The Beam runner will start reading data published on this topic from the time the pipeline
is started. Any data published on the topic before the pipeline is started will not be read
by the runner.</div>
</li>
</ul>
<a name="fromTopic-org.apache.beam.sdk.options.ValueProvider-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fromTopic</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;fromTopic(<a href="../../../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a>&lt;java.lang.String&gt;&nbsp;topic)</pre>
<div class="block">Like <code>topic()</code> but with a <a href="../../../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options"><code>ValueProvider</code></a>.</div>
</li>
</ul>
<a name="withClientFactory-org.apache.beam.sdk.io.gcp.pubsub.PubsubClient.PubsubClientFactory-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withClientFactory</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;withClientFactory(<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubClient.PubsubClientFactory.html" title="interface in org.apache.beam.sdk.io.gcp.pubsub">PubsubClient.PubsubClientFactory</a>&nbsp;factory)</pre>
<div class="block">The default client to write to Pub/Sub is the <a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubJsonClient.html" title="class in org.apache.beam.sdk.io.gcp.pubsub"><code>PubsubJsonClient</code></a>, created by the <code>PubsubJsonClient.PubsubJsonClientFactory</code>. This function allows to change the Pub/Sub client
by providing another <a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubClient.PubsubClientFactory.html" title="interface in org.apache.beam.sdk.io.gcp.pubsub"><code>PubsubClient.PubsubClientFactory</code></a> like the <code>PubsubGrpcClientFactory</code>.</div>
</li>
</ul>
<a name="withTimestampAttribute-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withTimestampAttribute</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;withTimestampAttribute(java.lang.String&nbsp;timestampAttribute)</pre>
<div class="block">When reading from Cloud Pub/Sub where record timestamps are provided as Pub/Sub message
attributes, specifies the name of the attribute that contains the timestamp.
<p>The timestamp value is expected to be represented in the attribute as either:
<ul>
<li>a numerical value representing the number of milliseconds since the Unix epoch. For
example, if using the Joda time classes, <a href="https://static.javadoc.io/joda-time/joda-time/2.10.3/org/joda/time/Instant.html?is-external=true#getMillis--" title="class or interface in org.joda.time"><code>Instant.getMillis()</code></a> returns the
correct value for this attribute.
<li>a String in RFC 3339 format. For example, <code>2015-10-29T23:41:41.123Z</code>. The
sub-second component of the timestamp is optional, and digits beyond the first three
(i.e., time units smaller than milliseconds) will be ignored.
</ul>
<p>If <code>timestampAttribute</code> is not provided, the system will generate record timestamps
the first time it sees each record. All windowing will be done relative to these timestamps.
<p>By default, windows are emitted based on an estimate of when this source is likely done
producing data for a given timestamp (referred to as the Watermark; see <a href="../../../../../../../org/apache/beam/sdk/transforms/windowing/AfterWatermark.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>AfterWatermark</code></a> for more details). Any late data will be handled by the trigger specified
with the windowing strategy &ndash; by default it will be output immediately.
<p>Note that the system can guarantee that no late data will ever be seen when it assigns
timestamps by arrival time (i.e. <code>timestampAttribute</code> is not provided).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></dd>
</dl>
</li>
</ul>
<a name="withIdAttribute-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withIdAttribute</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;withIdAttribute(java.lang.String&nbsp;idAttribute)</pre>
<div class="block">When reading from Cloud Pub/Sub where unique record identifiers are provided as Pub/Sub
message attributes, specifies the name of the attribute containing the unique identifier. The
value of the attribute can be any string that uniquely identifies this record.
<p>Pub/Sub cannot guarantee that no duplicate data will be delivered on the Pub/Sub stream.
If <code>idAttribute</code> is not provided, Beam cannot guarantee that no duplicate data will be
delivered, and deduplication of the stream will be strictly best effort.</div>
</li>
</ul>
<a name="withCoderAndParseFn-org.apache.beam.sdk.coders.Coder-org.apache.beam.sdk.transforms.SimpleFunction-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withCoderAndParseFn</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubIO.Read</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;withCoderAndParseFn(<a href="../../../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;coder,
<a href="../../../../../../../org/apache/beam/sdk/transforms/SimpleFunction.html" title="class in org.apache.beam.sdk.transforms">SimpleFunction</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubMessage.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubMessage</a>,<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;parseFn)</pre>
<div class="block">Causes the source to return a PubsubMessage that includes Pubsub attributes, and uses the
given parsing function to transform the PubsubMessage into an output type. A Coder for the
output type T must be registered or set on the output via <a href="../../../../../../../org/apache/beam/sdk/values/PCollection.html#setCoder-org.apache.beam.sdk.coders.Coder-"><code>PCollection.setCoder(Coder)</code></a>.</div>
</li>
</ul>
<a name="expand-org.apache.beam.sdk.values.PBegin-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>expand</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&nbsp;expand(<a href="../../../../../../../org/apache/beam/sdk/values/PBegin.html" title="class in org.apache.beam.sdk.values">PBegin</a>&nbsp;input)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#expand-InputT-">PTransform</a></code></span></div>
<div class="block">Override this method to specify how this <code>PTransform</code> should be expanded on the given
<code>InputT</code>.
<p>NOTE: This method should not be called directly. Instead apply the <code>PTransform</code> should
be applied to the <code>InputT</code> using the <code>apply</code> method.
<p>Composite transforms, which are defined in terms of other transforms, should return the
output of one of the composed transforms. Non-composite transforms, which do not apply any
transforms internally, should return a new unbound output and register evaluators (via
backend-specific registration methods).</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#expand-InputT-">expand</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/values/PBegin.html" title="class in org.apache.beam.sdk.values">PBegin</a>,<a href="../../../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&gt;</code></dd>
</dl>
</li>
</ul>
<a name="populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>populateDisplayData</h4>
<pre>public&nbsp;void&nbsp;populateDisplayData(<a href="../../../../../../../org/apache/beam/sdk/transforms/display/DisplayData.Builder.html" title="interface in org.apache.beam.sdk.transforms.display">DisplayData.Builder</a>&nbsp;builder)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">PTransform</a></code></span></div>
<div class="block">Register display data for the given transform or component.
<p><code>populateDisplayData(DisplayData.Builder)</code> is invoked by Pipeline runners to collect
display data via <a href="../../../../../../../org/apache/beam/sdk/transforms/display/DisplayData.html#from-org.apache.beam.sdk.transforms.display.HasDisplayData-"><code>DisplayData.from(HasDisplayData)</code></a>. Implementations may call <code>super.populateDisplayData(builder)</code> in order to register display data in the current namespace,
but should otherwise use <code>subcomponent.populateDisplayData(builder)</code> to use the namespace
of the subcomponent.
<p>By default, does not register any display data. Implementors may override this method to
provide their own display data.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">populateDisplayData</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html" title="interface in org.apache.beam.sdk.transforms.display">HasDisplayData</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">populateDisplayData</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/values/PBegin.html" title="class in org.apache.beam.sdk.values">PBegin</a>,<a href="../../../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;<a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" title="type parameter in PubsubIO.Read">T</a>&gt;&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>builder</code> - The builder to populate with display data.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html" title="interface in org.apache.beam.sdk.transforms.display"><code>HasDisplayData</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.PubsubTopic.html" title="class in org.apache.beam.sdk.io.gcp.pubsub"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.External.html" title="class in org.apache.beam.sdk.io.gcp.pubsub"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.Read.html" target="_top">Frames</a></li>
<li><a href="PubsubIO.Read.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#fields.inherited.from.class.org.apache.beam.sdk.transforms.PTransform">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>