Skip to content
This repository was archived by the owner on Oct 21, 2026. It is now read-only.
This repository was archived by the owner on Oct 21, 2026. It is now read-only.

Ack latency per message #1183

Closed
Closed

Description

@kirpichenko

I was exploring Google Cloud PubSub metrics and still not quite sure how to interpret Ack latency for subscription. From the metric description it's a Distribution of ack latencies in milliseconds. The ack latency is the time between when Cloud Pub/Sub sends a message to a subscriber client and when Cloud Pub/Sub receives an Acknowledge request for that message.

I did a simple node.js service which publishes message with a constant rate 2 messages per second.
Subscriber was configured to consume one message at the time (flowControl's maxMessages is set to 1) and waits 5 seconds before acknowledge received message. Metrics were pretty expected. Acknowledge operations rate is ~0.2/sec and Ack latency is around 5.2 sec.

Then I increased the amount of consumed messages to 5. The Acknowledge operations rate became 1/sec but Ack latency increased to 27sec even though messages were still resolving in 5 seconds

Increased the amount of consumed messages to 10 changed the Acknowledge operations rate to expected 2/sec but Ack latency stayed on the level of 27sec.

Screenshot 2021-01-11 at 19 29 53

I assume GC builds that metrics on it's own but does it really show the latency per message and is there anything to do with the nodejs-pubsub library itself?

Environment:
Node.js 10.14.2
@google-cloud/pubsub: 2.7.0

Activity

  1. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: questionRequest for information or clarification. Not an issue.
    on Jan 11, 2021
  2. added
    🚨This issue needs some love.
    and removed
    🚨This issue needs some love.
    on Apr 12, 2021
  3. removed
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Jun 11, 2021
  4. locked and limited conversation to collaborators on Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: pubsubIssues related to the googleapis/nodejs-pubsub API.type: questionRequest for information or clarification. Not an issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions