Skip to content

Commit aa202e7

Browse files
committed
---
yaml --- r: 28269 b: refs/heads/pubsub-ordering-keys c: 8573e5a h: refs/heads/master i: 28267: f538d3b
1 parent a9838b1 commit aa202e7

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

  • branches/pubsub-ordering-keys/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ refs/tags/v0.72.0: a7703f2593ba312c0b2dde6fdfd4f5c764bb55ac
155155
refs/tags/v0.73.0: 21241ea8be9439cc5764c4944cdce21d34ce4f9e
156156
refs/tags/v0.74.0: 9d1f733dbbf790de7b494418523b69c4a9a57638
157157
refs/heads/ignoretest: 23c412ae07af3d0ab1caa2d44d5bc5c0ccb8b31d
158-
refs/heads/pubsub-ordering-keys: 9259fe6ac1aff27c9fa12ae01b73fc62710b8566
158+
refs/heads/pubsub-ordering-keys: 8573e5a3d390da24e132a2ef7d03b46bb2400fe3
159159
refs/tags/v0.75.0: c3673089ae09a897c1b4cf7dfe167fe4f8ab32fb
160160
refs/tags/v0.76.0: 395b016826d3ddf9cb8b34919636df15a4dbd032
161161
refs/tags/v0.77.0: 28a85a77883ccf5d48f297fd0ef3b3dca6ce01f0

branches/pubsub-ordering-keys/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ public ApiFuture<String> publish(PubsubMessage message) {
240240
}
241241

242242
batchesToSend = messagesBatch.add(outstandingPublish);
243+
if (!batchesToSend.isEmpty() && messagesBatch.isEmpty()) {
244+
messagesBatches.remove(orderingKey);
245+
}
243246
setupAlarm();
244247
} finally {
245248
messagesBatchLock.unlock();

0 commit comments

Comments
 (0)