Skip to content

Commit 4e9fae9

Browse files
authored
---
yaml --- r: 27243 b: refs/heads/pubsub-ordering-keys c: 9352d64 h: refs/heads/master i: 27241: d093e80 27239: d061a95
1 parent 6b472ba commit 4e9fae9

9 files changed

Lines changed: 60 additions & 865 deletions

File tree

[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: 18aca86a159dd0daf0e6c7334de0d9a70e4bc788
158+
refs/heads/pubsub-ordering-keys: 9352d6440b6c178d92f3be43a608ed885f78358c
159159
"refs/heads/update_mvn_badge": ae2d773814db0f71197ccf5a8612ee1d8056f8de
160160
refs/tags/v0.75.0: c3673089ae09a897c1b4cf7dfe167fe4f8ab32fb
161161
refs/tags/v0.76.0: 395b016826d3ddf9cb8b34919636df15a4dbd032

branches/pubsub-ordering-keys/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ Java idiomatic client for [Google Cloud Platform][cloud-platform] services.
1313
This library supports the following Google Cloud Platform services with clients at a [GA](#versioning) quality level:
1414
- [BigQuery](google-cloud-clients/google-cloud-bigquery) (GA)
1515
- [Cloud Datastore](google-cloud-clients/google-cloud-datastore) (GA)
16+
- [Cloud Firestore](google-cloud-clients/google-cloud-firestore) (GA)
17+
- [Cloud KMS](google-cloud-clients/google-cloud-kms) (GA)
1618
- [Cloud Natural Language](google-cloud-clients/google-cloud-language) (GA)
1719
- [Cloud Pub/Sub](google-cloud-clients/google-cloud-pubsub) (GA)
1820
- [Cloud Spanner](google-cloud-clients/google-cloud-spanner) (GA)
21+
- [Cloud Speech](google-cloud-clients/google-cloud-speech) (GA)
1922
- [Cloud Storage](google-cloud-clients/google-cloud-storage) (GA)
2023
- [Cloud Translation](google-cloud-clients/google-cloud-translate) (GA)
2124
- [Cloud Vision](google-cloud-clients/google-cloud-vision) (GA)
@@ -29,10 +32,7 @@ This library supports the following Google Cloud Platform services with clients
2932
- [Cloud AutoML](google-cloud-clients/google-cloud-automl) (Beta)
3033
- [Cloud Container Analysis](google-cloud-clients/google-cloud-containeranalysis) (Beta)
3134
- [Cloud Data Loss Prevention](google-cloud-clients/google-cloud-dlp) (Beta)
32-
- [Cloud Firestore](google-cloud-clients/google-cloud-firestore) (Beta)
3335
- [Cloud IoT Core](google-cloud-clients/google-cloud-iot) (Beta)
34-
- [Cloud KMS](google-cloud-clients/google-cloud-kms) (Beta)
35-
- [Cloud Speech](google-cloud-clients/google-cloud-speech) (Beta)
3636
- [Cloud Text-to-Speech](google-cloud-clients/google-cloud-texttospeech) (Beta)
3737
- [Cloud Video Intelligence](google-cloud-clients/google-cloud-video-intelligence) (Beta)
3838
- [Kubernetes Engine](google-cloud-clients/google-cloud-container) (Beta)

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class MessageDispatcher {
6262
@InternalApi static final Duration PENDING_ACKS_SEND_DELAY = Duration.ofMillis(100);
6363

6464
private final Executor executor;
65-
private final SequentialExecutorService.AutoExecutor sequentialExecutor;
6665
private final ScheduledExecutorService systemExecutor;
6766
private final ApiClock clock;
6867

@@ -206,7 +205,6 @@ void sendAckOperations(
206205
jobLock = new ReentrantLock();
207206
messagesWaiter = new MessageWaiter();
208207
this.clock = clock;
209-
this.sequentialExecutor = new SequentialExecutorService.AutoExecutor(executor);
210208
}
211209

212210
void start() {
@@ -351,7 +349,7 @@ public void nack() {
351349
}
352350
};
353351
ApiFutures.addCallback(response, ackHandler, MoreExecutors.directExecutor());
354-
Runnable deliverMessageTask =
352+
executor.execute(
355353
new Runnable() {
356354
@Override
357355
public void run() {
@@ -372,12 +370,7 @@ public void run() {
372370
response.setException(e);
373371
}
374372
}
375-
};
376-
if (message.getOrderingKey().isEmpty()) {
377-
executor.execute(deliverMessageTask);
378-
} else {
379-
sequentialExecutor.submit(message.getOrderingKey(), deliverMessageTask);
380-
}
373+
});
381374
}
382375

383376
/** Compute the ideal deadline, set subsequent modacks to this deadline, and return it. */

0 commit comments

Comments
 (0)