Skip to content

Pubsub acks are unsuccessful #3567

@stetra

Description

@stetra

When I use the streaming pull subscriber through the MessageReceiver interface, it seems acks usually expire, and even if they don't expire, the number of backlogged messages never changes (num_undelivered_messages in Stackdriver). This only seems to happen if messages take a while to be processed, i.e., more than a few minutes.

It's strange that acks are expired in the first place because I do see that the client is sending modify ack deadline requests (mod_ack_deadline_message_operation_count in Stackdriver). The subscription itself has an ack deadline of 10 minutes so these messages are processed well within the deadline.

Even when acks are successful (i.e., non-expired), num_undelivered_messages is unaffected in Stackdriver. I do see the previously acked messages being redelivered as well.

Another thing I noticed that even though the client is performing streaming pulls, in Stackdriver I see metric data coming in for pull_ack_message_operation_count but none for streaming_pull_ack_message_operation_count. Similarly I see results for mod_ack_deadline_message_operation_count but not for streaming_pull_mod_ack_deadline_message_operation_count. Is this expected?

I am using version 1.37.1 of the google-cloud-pubsub library. I have uploaded my code here: https://gist.github.com/stetra/d757fed41cb67d4a73dd7487ca4d452e

The following Stackdriver graphs show that successful acks are apparently happening, yet the backlog is not decreasing.
acks
num_undelivered_messages
modacks

In summary, these are my questions:

  1. Despite successful acks occurring, why is the number of unacknowledged messages not decreasing?

  2. Why are expired acks occurring in the first place?

  3. Why is the client performing streaming pulls with non-streaming acks and modacks?

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub 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