googleapis / googleapis/google-cloud-python

Make initial modack asynchronous

Offen
#15,645 1 Kommentar 0 Reaktionen 1 zugewiesene Person Beansprucht von @abbrowne126 Auf GitHub ansehen
api: pubsub type: feature request
Vorherrschende Sprache
Python
Sterne
5.4k
Forks
1.8k
Ø Merge
3 T. 4 Std.
Gemergte PRs (30 T.)
122

Beschreibung

See [this bug in the issue tracker](https://issuetracker.google.com/issues/329314022) for context. The initial modack is [initiated synchronously](https://github.com/googleapis/python-pubsub/blob/main/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py#L1101-L1104) upon receiving a message. In contrast, Java [queues them to happen asynchronously](https://github.com/googleapis/java-pubsub/blob/20099510c647bd8292711976d6eaeceef98bbed8/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java#L417). This appears to have some performance implications. We should instead queue these up to happen asynchronously, though we need to ensure we execute them relatively soon. Right now, they could happen as late as [90% of the ack deadline](https://github.com/googleapis/python-pubsub/blob/2b35e6557e16885ea8e6d4695b8dd3f3bd960eab/google/cloud/pubsub_v1/subscriber/_protocol/leaser.py#L230-L232).

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.