You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: branches/pubsub-ordering-keys/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -269,18 +269,18 @@ && hasBatchingBytes()
269
269
270
270
if (batchToSend != null) {
271
271
logger.log(Level.FINER, "Scheduling a batch for immediate sending.");
272
-
publishOutstandingBatch(batchToSend);
273
272
publishAllOutstanding();
273
+
publishOutstandingBatch(batchToSend);
274
274
}
275
275
276
276
// If the message is over the size limit, it was not added to the pending messages and it will
277
277
// be sent in its own batch immediately.
278
278
if (hasBatchingBytes() && messageSize >= getMaxBatchBytes()) {
279
279
logger.log(
280
280
Level.FINER, "Message exceeds the max batch bytes, scheduling it for immediate send.");
Copy file name to clipboardExpand all lines: branches/pubsub-ordering-keys/google-cloud-clients/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -338,6 +338,39 @@ public void testBatchedMessagesWithOrderingKeyByDuration() throws Exception {
0 commit comments