GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

Copy link
Copy link
Closed
Closed
Pubsub: Warning during acknowledgement message on subscription with enabled Exactly once delivery flag#1266
Copy link
Assignees
maitrimangal
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

@rozhkova-syberry
rozhkova-syberry
opened on Sep 9, 2022
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?

Activity

  1. product-auto-label
    added
    api: pubsubIssues related to the googleapis/java-pubsub API.
    on Sep 9, 2022
  2. rozhkova-syberry
    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, 2022
  3. hannahrogers-google
    added 2 commits that reference this issue on May 12, 2023

    fix(java): java 17 dependency arguments (googleapis#1266) (googleapis…

    ed3ae2f

    chore: release 1.115.0 (googleapis#889)

    cf45b2e
  4. samcrutt9900 commented on Jun 1, 2023

    @samcrutt9900
    samcrutt9900
    on Jun 1, 2023
    More actions

    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.

  5. maitrimangal
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Aug 16, 2023
  6. maitrimangal
    self-assigned this
    on Aug 16, 2023
  7. maitrimangal commented on Aug 21, 2023

    @maitrimangal
    maitrimangal
    on Aug 21, 2023
    Contributor
    More actions

    Might be fixed with #1540

  8. maitrimangal commented on Aug 24, 2023

    @maitrimangal
    maitrimangal
    on Aug 24, 2023
    Contributor
    More actions

    Just merged this PR #1540 , please reopen this issue if the problem you are having still reoccurs.

  9. maitrimangal
    closed this as completedon Aug 24, 2023
  10. Sourc commented on Oct 20, 2023

    @Sourc
    Sourc
    on Oct 20, 2023
    More actions

    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.

  11. kamalaboulhosn commented on Oct 25, 2023

    @kamalaboulhosn
    kamalaboulhosn
    on Oct 25, 2023
    Contributor
    More actions

    @Sourc What is the version of Spring and the client library you are using?

  12. Sourc commented on Oct 25, 2023

    @Sourc
    Sourc
    on Oct 25, 2023
    More actions

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @maitrimangal
    maitrimangal

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.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.