File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1 Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 1919import com .google .common .util .concurrent .ListenableFuture ;
2020import com .google .pubsub .v1 .PubsubMessage ;
2121
22- /** Users of the {@link Subscriber} must implement this interface to receive messages. */
22+ /** This interface can be implemented by users of {@link Subscriber} to receive messages. */
2323public interface MessageReceiver {
24- enum AckReply {
25- /** To be used for acking a message. */
24+ /** A reply to a message, to be sent back to the service. */
25+ enum AckReply {
26+ /**
27+ * Acknowledges that the message has been successfully processed. The service will not send the
28+ * message again.
29+ */
2630 ACK ,
27- /** To be used for nacking a message. */
31+ /**
32+ * Signals that the message has not been successfully processed. The service will resend the
33+ * message.
34+ */
2835 NACK
2936 }
37+
3038 /**
3139 * Called when a message is received by the subscriber.
3240 *
Original file line number Diff line number Diff line change 109109 */
110110public class Publisher {
111111 /** The maximum number of messages in one request. Defined by the API. */
112- public static long getApiMaxBundleMessages () {
112+ public static long getApiMaxRequestElementCount () {
113113 return 1000L ;
114114 }
115115
116116 /** The maximum size of one request. Defined by the API. */
117- public static long getApiMaxBundleBytes () {
117+ public static long getApiMaxRequestBytes () {
118118 return 10L * 1000L * 1000L ; // 10 megabytes (https://en.wikipedia.org/wiki/Megabyte)
119119 }
120120
@@ -193,7 +193,7 @@ private Publisher(Builder builder) throws IOException {
193193 messagesWaiter = new MessagesWaiter ();
194194 }
195195
196- /** Topic to which the publisher publishes to. */
196+ /** Topic which the publisher publishes to. */
197197 public String getTopic () {
198198 return topic ;
199199 }
Original file line number Diff line number Diff line change @@ -361,14 +361,17 @@ public SubscriberStats getStats() {
361361 return null ;
362362 }
363363
364+ /** Subscription which the subscriber is subscribed to. */
364365 public String getSubscription () {
365366 return subscription ;
366367 }
367368
369+ /** Acknowledgement expiration padding. See {@link Builder.setAckExpirationPadding}. */
368370 public Duration getAckExpirationPadding () {
369371 return ackExpirationPadding ;
370372 }
371373
374+ /** The flow control settings the Subscriber is configured with. */
372375 public FlowController .Settings getFlowControlSettings () {
373376 return flowControlSettings ;
374377 }
You can’t perform that action at this time.
0 commit comments