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
issue: make_subscriber() doesn't make a subscriber #47
Comments
This assumes that you already have access to a 'subscriber client' object that can make subscribers. But that client has no lifetime concerns and no member variables to the extent that I can tell. Can you provide me the interface of the "SubscriberClient" object that you would want? |
Pub/Sub's subscriber client wraps Does the Lite library work with |
No, it uses python-pubsublite/google/cloud/pubsublite_v1/services/subscriber_service/async_client.py Line 47 in ec19dfc
|
Oh tricky. I don't know if I agree with not exposing the methods in I would imagine the subscriber client interface to be similar to |
The only method on SubscriberServiceAsyncClient is a subscribe async method that returns an AsyncIterator. There's nothing else there other than:
Which then comes back to the question I asked in my first comment. Do you want a Client class that is just a wrapper of a bag of parameters? Specifically credentials, transport and client options? I can do that, it just seems strange to me. I'll provide a mock-up of what this would look like. |
What I don't understand is why the imperfections in the listed methods (credentials, transport, and client options) can't be overwritten and fixed in the handwritten layer. I recently approved a fix in the handwritten layer by a MTLS folk (googleapis/python-pubsub#226). I expect users to set flow control settings and partitions on the subscriber, then start subscribing similar to how it's done in Java: Subscriber subscriber = Subscriber.create(subscriberSettings);
subscriber.startAsync().awaitRunning(); Our public docs introduce subscriber as a concept when explaining how Pub/Sub Lite works. Not having a subscriber client is going to be confusing. |
Fixed via #56 |
make_subscriber()
makes aStreamingPullFuture
(whilemake_async_subscriber()
seems like something users are expected to use):python-pubsublite/google/cloud/pubsublite/cloudpubsub/make_subscriber.py
Lines 205 to 216 in ec19dfc
Current:
Expected:
The text was updated successfully, but these errors were encountered: