2020
2121import com .google .cloud .pubsub .spi .v1 .SubscriberClient ;
2222import com .google .common .base .MoreObjects ;
23-
2423import java .io .Serializable ;
2524import java .util .Objects ;
26- import java .util .concurrent .TimeUnit ;
2725
2826/**
2927 * A Google Cloud Pub/Sub subscription. A subscription represents the stream of messages from a
3634 * processed and the Pub/Sub system can delete it from the subscription; a non-success response
3735 * indicates that the Pub/Sub server should resend it (implicit "nack").
3836 *
39- * <p>In a pull subscription, the subscribing application must explicitly pull messages using one of
40- * {@link PubSub#pull(String, int)}, {@link PubSub#pullAsync(String, int)} or
41- * {@link PubSub#pullAsync(String, PubSub.MessageProcessor callback, PubSub.PullOption...)}.
42- * When messages are pulled with {@link PubSub#pull(String, int)} or
43- * {@link PubSub#pullAsync(String, int)} the subscribing application must also explicitly
44- * acknowledge them using one of {@link PubSub#ack(String, Iterable)},
45- * {@link PubSub#ack(String, String, String...)}, {@link PubSub#ackAsync(String, Iterable)} or
46- * {@link PubSub#ackAsync(String, String, String...)}.
37+ * <p>In a pull subscription, the subscribing application must pull messages using {@link
38+ * PubSub#getSubscriber(SubscriptionInfo, Subscriber.MessageReceiver)}.
4739 *
4840 * @see <a href="https://cloud.google.com/pubsub/overview#data_model">Pub/Sub Data Model</a>
4941 * @see <a href="https://cloud.google.com/pubsub/subscriber">Subscriber Guide</a>
@@ -140,10 +132,10 @@ public abstract static class Builder {
140132 * acknowledge the message. After message delivery but before the ack deadline expires and
141133 * before the message is acknowledged, it is an outstanding message and will not be delivered
142134 * again during that time (on a best-effort basis). For pull subscriptions, this value is used
143- * as the initial value for the ack deadline. To override the ack deadline value for a given
144- * message, use {@link PubSub#modifyAckDeadline(String, int, TimeUnit, Iterable)}. For push
145- * delivery, this value is used to set the request timeout for the call to the push endpoint.
146- * This value must be between 10 and 600 seconds, if not specified, 10 seconds is used.
135+ * as the initial value for the ack deadline, and {@link Subscriber} automatically renews
136+ * unprocessed messages. For push delivery, this value is used to set the request timeout for
137+ * the call to the push endpoint. This value must be between 10 and 600 seconds, if not
138+ * specified, 10 seconds is used.
147139 */
148140 @ Deprecated
149141 public abstract Builder ackDeadLineSeconds (int ackDeadLineSeconds );
@@ -153,10 +145,10 @@ public abstract static class Builder {
153145 * acknowledge the message. After message delivery but before the ack deadline expires and
154146 * before the message is acknowledged, it is an outstanding message and will not be delivered
155147 * again during that time (on a best-effort basis). For pull subscriptions, this value is used
156- * as the initial value for the ack deadline. To override the ack deadline value for a given
157- * message, use {@link PubSub#modifyAckDeadline(String, int, TimeUnit, Iterable)}. For push
158- * delivery, this value is used to set the request timeout for the call to the push endpoint.
159- * This value must be between 10 and 600 seconds, if not specified, 10 seconds is used.
148+ * as the initial value for the ack deadline. , and {@link Subscriber} automatically renews
149+ * unprocessed messages. For push delivery, this value is used to set the request timeout for
150+ * the call to the push endpoint. This value must be between 10 and 600 seconds, if not
151+ * specified, 10 seconds is used.
160152 */
161153 public abstract Builder setAckDeadLineSeconds (int ackDeadLineSeconds );
162154
@@ -333,13 +325,13 @@ public PushConfig getPushConfig() {
333325
334326 /**
335327 * Returns the maximum time after a subscriber receives a message before the subscriber should
336- * acknowledge the message. After message delivery but before the ack deadline expires and
337- * before the message is acknowledged, it is an outstanding message and will not be delivered
338- * again during that time (on a best-effort basis). For pull subscriptions, this value is used
339- * as the initial value for the ack deadline. To override the ack deadline value for a given
340- * message, use {@link PubSub#modifyAckDeadline(String, int, TimeUnit, Iterable)}. For push
341- * delivery, this value is used to set the request timeout for the call to the push endpoint. This
342- * value must be between 10 and 600 seconds, if not specified, 10 seconds is used.
328+ * acknowledge the message. After message delivery but before the ack deadline expires and before
329+ * the message is acknowledged, it is an outstanding message and will not be delivered again
330+ * during that time (on a best-effort basis). For pull subscriptions, this value is used as the
331+ * initial value for the ack deadline, and {@link Subscriber} automatically renews unprocessed
332+ * messages. For push delivery, this value is used to set the request timeout for the call to the
333+ * push endpoint. This value must be between 10 and 600 seconds, if not specified, 10 seconds is
334+ * used.
343335 */
344336 @ Deprecated
345337 public long ackDeadlineSeconds () {
@@ -348,13 +340,13 @@ public long ackDeadlineSeconds() {
348340
349341 /**
350342 * Returns the maximum time after a subscriber receives a message before the subscriber should
351- * acknowledge the message. After message delivery but before the ack deadline expires and
352- * before the message is acknowledged, it is an outstanding message and will not be delivered
353- * again during that time (on a best-effort basis). For pull subscriptions, this value is used
354- * as the initial value for the ack deadline. To override the ack deadline value for a given
355- * message, use {@link PubSub#modifyAckDeadline(String, int, TimeUnit, Iterable)}. For push
356- * delivery, this value is used to set the request timeout for the call to the push endpoint. This
357- * value must be between 10 and 600 seconds, if not specified, 10 seconds is used.
343+ * acknowledge the message. After message delivery but before the ack deadline expires and before
344+ * the message is acknowledged, it is an outstanding message and will not be delivered again
345+ * during that time (on a best-effort basis). For pull subscriptions, this value is used as the
346+ * initial value for the ack deadline, and {@link Subscriber} automatically renews unprocessed
347+ * messages. For push delivery, this value is used to set the request timeout for the call to the
348+ * push endpoint. This value must be between 10 and 600 seconds, if not specified, 10 seconds is
349+ * used.
358350 */
359351 public long getAckDeadlineSeconds () {
360352 return ackDeadlineSeconds ;
0 commit comments