-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PubSub: Deprecate several FlowControl settings and things in Message class #8796
Conversation
@plamut I can't seem to find any information on what these settings are being deprecated in favor of -- is there somewhere we can read the "offline email thread" to catch up on this? It would be great if we could get an upgrade path here; ie. "instead of setting |
@TheKevJames I can give an unofficial answer - these settings are/were specific to the Python implementation of the PubSub client, while clients for other languages do not have them. Since consistency across various implementations is desired, the decision was made to deprecate some of the Python PubSub client implementation. I will also try to get an official answer on this matter. |
@TheKevJames The deprecated items fit into three categories:
If you have specific reasons for which the defaults of the properties are not sufficient, please let us know. If there are use cases where we need to consider adding more control, we can look at them across the Cloud Pub/Sub client libraries in all languages. For now, prior to marking the library GA, we'd like to err on the side of having too few controls exposed than having too many. |
@kamalaboulhosn thanks for the response! (1) and (3) definitely make sense to me, and I'm fully onboard. I've never had occasion to tune I think (2) is where I get a bit confused, since the defaults have a bunch of scenarios where they might benefit from being tuned: At $myworkplace we've tuned
Since we care pretty heavily about memory usage, performance, and latency in $myapps, we've tuned these pretty heavily. We've done a bunch of math and have an internal guide for tuning these values, would sharing it be helpful? |
@TheKevJames Are these things that |
@kamalaboulhosn Its totally possible I misread the code and thus have an incorrect understanding! As far as I can tell, though:
Then psuedo-code for the SubscriptionClient would roughly be:
So therefore tuning
Of course, some of that time is concurrent with task execution, so you would want to tune those values to be approximately equal to the expected time it takes to process your tasks in order to minimize time spent waiting on leasing. |
@TheKevJames I believe the amount of memory consumed by messages is going to be ~min( |
I'm definitely misunderstanding something, then! Would you mind pointing out the flaw in my following logic? So at any given point, if you have more than |
This method is in QueueCallbackWorker. The only place that creates a QueueCallbackWorker is Dispatcher. The Dispatcher passes as the method to be called on the queue dispatch_callback. This method only deals with sending acks/nacks/modacks. The queue in the instance of the Dispatcher is set to be the one in the scheduler. This queue passed into every constructed message. A message populates this queue with acks, nacks, and modacks. None of this affects the messages that are actually fetched from the server. |
Gotcha, that makes sense. Thanks, that helps tremendously! |
As per offline email thread, this PR marks several aspects of the Python PubSub client as deprecated. The PR assumes that deprecation will happen in version
0.43.1
(current version:0.43.0
)How to test
Steps to perform:
Verify that all discussed features are properly marked as deprecated, and that this is reflected in the docs.
To generate the docs, run the following from inside the
pubsub/
directory:... and open the generated docs in the browser: