We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0a2fc2 commit 1e79087Copy full SHA for 1e79087
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
@@ -290,7 +290,12 @@ public void run() {
290
}
291
292
293
- private void publishAllOutstanding() {
+ /**
294
+ * Publish any outstanding batches if non-empty. This method sends buffered messages, but does
295
+ * not wait for the send operations to complete. To wait for messages to send, call {@code get}
296
+ * on the futures returned from {@code publish}.
297
+ */
298
+ public void publishAllOutstanding() {
299
messagesBatchLock.lock();
300
OutstandingBatch batchToSend;
301
try {
0 commit comments