Skip to content

Commit 6e73ab9

Browse files
fix: updating return types of ack/nack futures to be consistent with publish (#1204)
* fix: updating return types of ack/nack to be consistent with publish * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * reverting a README change * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot
1 parent 507174b commit 6e73ab9

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ implementation 'com.google.cloud:google-cloud-pubsub'
5858
If you are using Gradle without BOM, add this to your dependencies:
5959

6060
```Groovy
61-
implementation 'com.google.cloud:google-cloud-pubsub:1.120.2'
61+
implementation 'com.google.cloud:google-cloud-pubsub:1.120.3'
6262
```
6363

6464
If you are using SBT, add this to your dependencies:
6565

6666
```Scala
67-
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.120.2"
67+
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.120.3"
6868
```
6969

7070
## Authentication

google-cloud-pubsub/clirr-ignored-differences.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,21 @@
1717
<className>com/google/cloud/pubsub/v1/MessageDispatcher$BuilderclassName>
1818
<method>com.google.cloud.pubsub.v1.MessageDispatcher$Builder setEnableExactlyOnceDelivery(boolean)method>
1919
difference>
20+
21+
<difference>
22+
23+
<differenceType>7006differenceType>
24+
<className>com/google/cloud/pubsub/v1/AckReplyConsumerWithResponseclassName>
25+
<method>*ack()method>
26+
<to>com.google.api.core.ApiFutureto>
27+
<justification>Updating return types to be consistent with Publishjustification>
28+
difference>
29+
<difference>
30+
31+
<differenceType>7006differenceType>
32+
<className>com/google/cloud/pubsub/v1/AckReplyConsumerWithResponseImplclassName>
33+
<method>*ack()method>
34+
<to>com.google.api.core.ApiFutureto>
35+
<justification>Updating return types to be consistent with Publishjustification>
36+
difference>
2037
differences>

google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/AckReplyConsumerWithResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
package com.google.cloud.pubsub.v1;
1818

19+
import com.google.api.core.ApiFuture;
1920
import com.google.api.core.BetaApi;
20-
import java.util.concurrent.Future;
2121

2222
/**
2323
* Acknowledging a message in Pub/Sub means that you are done with it, and it will not be delivered
@@ -42,13 +42,13 @@ public interface AckReplyConsumerWithResponse {
4242
*
4343
*

A future representing the server response is returned

4444
*/
45-
Future<AckResponse> ack();
45+
ApiFuture<AckResponse> ack();
4646

4747
/**
4848
* Signals that the message has not been successfully processed. The service should resend the
4949
* message.
5050
*
5151
*

A future representing the server response is returned

5252
*/
53-
Future<AckResponse> nack();
53+
ApiFuture<AckResponse> nack();
5454
}

google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/AckReplyConsumerWithResponseImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616
package com.google.cloud.pubsub.v1;
1717

18+
import com.google.api.core.ApiFuture;
1819
import com.google.api.core.SettableApiFuture;
19-
import java.util.concurrent.Future;
2020

2121
public class AckReplyConsumerWithResponseImpl implements AckReplyConsumerWithResponse {
2222
final SettableApiFuture<MessageDispatcher.AckReply> ackReplySettableApiFuture;
@@ -30,13 +30,13 @@ public AckReplyConsumerWithResponseImpl(
3030
}
3131

3232
@Override
33-
public Future<AckResponse> ack() {
33+
public ApiFuture<AckResponse> ack() {
3434
ackReplySettableApiFuture.set(MessageDispatcher.AckReply.ACK);
3535
return messageFuture;
3636
}
3737

3838
@Override
39-
public Future<AckResponse> nack() {
39+
public ApiFuture<AckResponse> nack() {
4040
ackReplySettableApiFuture.set(MessageDispatcher.AckReply.NACK);
4141
return messageFuture;
4242
}

0 commit comments

Comments
 (0)