GeezerVison is showing github.com — Pubsub: Warning during acknowledgement message on subscription with enabled Exactly once delivery flag · Issue #1266 · googleapis/java-pubsub
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
Pubsub: Warning during acknowledgement message on subscription with enabled Exactly once delivery flag #1266
Labels
api: pubsubIssues related to the googleapis/java-pubsub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. Description
Environment details
- OS type and version: Windows 10
- java version: 11
- spring boot version: 2.6.7
- google-cloud-pubsub library version: 1.115.1
Steps to reproduce
- Create pubsub subscription on gcp with the following configurations:
- Delivery type: Pull
- Acknowledgment deadline: 600 secs
- Exactly once delivery: True
- Retry policy: retry immediately
- Create spring boot application and add
- 'com.google.cloud:spring-cloud-gcp-starter-pubsub' as a dependency . This dependency contains google-cloud-pubsub library
1.115.1
- mavenBom "com.google.cloud:spring-cloud-gcp-dependencies:3.1.0"
- Configure PubSubConfiguration class to receive messages from specified subscription
Code
PubSubConfiguration class
@Bean
public PubSubInboundChannelAdapter messageChannelAdapter(
@Qualifier("inputChannel") MessageChannel inputChannel,
PubSubTemplate pubSubTemplate
) {
PubSubInboundChannelAdapter adapter =
new PubSubInboundChannelAdapter(pubSubTemplate, subscriptionName);
adapter.setOutputChannel(inputChannel);
adapter.setAckMode(AckMode.MANUAL);
adapter.setPayloadType(WorkflowEventMessage.class);
adapter.setErrorChannelName(ERROR_CHANNEL_NAME);
return adapter;
}
@Bean
@Qualifier("inputChannel")
public MessageChannel inputChannel() {
return new DirectChannel();
}
@Bean
@ServiceActivator(inputChannel = "inputChannel")
public MessageHandler messageReceiver() {
// do the logic
originalMessage.ack();
}
application.yaml
spring:
cloud:
gcp:
pubsub:
subscriber:
max-ack-extension-period: 600
Actual behavior
Periodically I see in the logs warning
com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Some acknowledgement ids in the request were invalid. This could be because the acknowledgement ids have expired or the acknowledgement ids were malformed
After investigation I found that this exception appears after modifyAckDeadline call during acknowledgement pubsub message.
Expected behavior
No warnings in the logs.
Additional information
Pubsub messages are processed successfully without redeliveries but with this warning in the logs.
I updated google-cloud-pubsub library to 1.120.12 and tested it, but I still saw this warning in the logs.
If Exactly once delivery is disabled on subscription than there are no warnings in the logs.
Why this warning is displayed and and what issues it can potentially cause?
Activity
changed the title
[-]Pubsub: Warning on subscription with enabled Exactly once delivery[/-] [+]Pubsub: Warning during acknowledgement message on subscription with enabled Exactly once delivery flag[/+] on Sep 9, 2022samcrutt9900 commented on Jun 1, 2023
I'm experiencing exactly the same issue as this using 1.123.12 of the client lib and subscribing to an exactly once delivery subscription.
maitrimangal commented on Aug 21, 2023
Might be fixed with #1540
maitrimangal commented on Aug 24, 2023
Just merged this PR #1540 , please reopen this issue if the problem you are having still reoccurs.
Sourc commented on Oct 20, 2023
I've seen this issue as well when looking into another issue #1778, so it still seems to be there. It happens separately from the concurrent modification issues.
kamalaboulhosn commented on Oct 25, 2023
@Sourc What is the version of Spring and the client library you are using?
Sourc commented on Oct 25, 2023
@kamalaboulhosn No Spring, same setup as described in #1778. But I actually believe my warnings are caused by the soft-crashing of the subscribers, so it's most likely different from what's been the cause here. No need to re-open this issue just yet.
Metadata
Metadata
api: pubsubIssues related to the googleapis/java-pubsub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. Development
No branches or pull requestsIssue actions