We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9259fe6 commit 8573e5aCopy full SHA for 8573e5a
1 file changed
google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
@@ -240,6 +240,9 @@ public ApiFuture<String> publish(PubsubMessage message) {
240
}
241
242
batchesToSend = messagesBatch.add(outstandingPublish);
243
+ if (!batchesToSend.isEmpty() && messagesBatch.isEmpty()) {
244
+ messagesBatches.remove(orderingKey);
245
+ }
246
setupAlarm();
247
} finally {
248
messagesBatchLock.unlock();
0 commit comments