File tree Expand file tree Collapse file tree
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1 Expand file tree Collapse file tree 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 110110 */
111111public class Publisher {
112112 /** The maximum number of messages in one request. Defined by the API. */
113- public static long getApiMaxBundleMessages () {
113+ public static long getApiMaxRequestElementCount () {
114114 return 1000L ;
115115 }
116116
117117 /** The maximum size of one request. Defined by the API. */
118- public static long getApiMaxBundleBytes () {
118+ public static long getApiMaxRequestBytes () {
119119 return 10L * 1000L * 1000L ; // 10 megabytes (https://en.wikipedia.org/wiki/Megabyte)
120120 }
121121
@@ -194,7 +194,7 @@ public void close() throws IOException {
194194 messagesWaiter = new MessagesWaiter ();
195195 }
196196
197- /** Topic to which the publisher publishes to. */
197+ /** Topic which the publisher publishes to. */
198198 public String getTopic () {
199199 return topic ;
200200 }
Original file line number Diff line number Diff line change @@ -370,14 +370,17 @@ public SubscriberStats getStats() {
370370 return null ;
371371 }
372372
373+ /** Subscription which the subscriber is subscribed to. */
373374 public String getSubscription () {
374375 return subscription ;
375376 }
376377
378+ /** Acknowledgement expiration padding. See {@link Builder.setAckExpirationPadding}. */
377379 public Duration getAckExpirationPadding () {
378380 return ackExpirationPadding ;
379381 }
380382
383+ /** The flow control settings the Subscriber is configured with. */
381384 public FlowController .Settings getFlowControlSettings () {
382385 return flowControlSettings ;
383386 }
You can’t perform that action at this time.
0 commit comments