Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 8, 2026. It is now read-only.
This repository was archived by the owner on May 8, 2026. It is now read-only.

Pubsub: Warning during acknowledgement message on subscription with enabled Exactly once delivery flag #1266

Copy link
Copy link

Description

@rozhkova-syberry
Issue body actions

Environment details

  1. OS type and version: Windows 10
  2. java version: 11
  3. spring boot version: 2.6.7
  4. google-cloud-pubsub library version: 1.115.1

Steps to reproduce

  1. Create pubsub subscription on gcp with the following configurations:
    • Delivery type: Pull
    • Acknowledgment deadline: 600 secs
    • Exactly once delivery: True
    • Retry policy: retry immediately
  2. 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"
  3. 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?

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the googleapis/java-pubsub API.Issues related to the googleapis/java-pubsub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.