Skip to content
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

Need non-experimental way to raise maxInboundMessageSize #2763

Closed
garrettjonesgoogle opened this issue Feb 27, 2017 · 6 comments
Closed

Need non-experimental way to raise maxInboundMessageSize #2763

garrettjonesgoogle opened this issue Feb 27, 2017 · 6 comments

Comments

@garrettjonesgoogle
Copy link
Contributor

As per googleapis/google-cloud-java#1499 , users of Pub/Sub see errors when their messages exceed 4MB, even though Pub/Sub's limit is 20 MB. Ideally we'd like to call maxInboundMessageSize to raise this maximum, but it turns out that maxInboundMessageSize is experimental. I don't see an open issue for making it non-experimental - when will this be done?

@carl-mastrangelo
Copy link
Contributor

@garrettjonesgoogle The issue is that it isn't clear if this is the right way for controlling the size. Stubs can control the message size, but so can the Channel. Should there be two ways of doing the same thing? It isn't clear where such a thing should live, and which should override which.

@garrettjonesgoogle
Copy link
Contributor Author

I didn't realize this could be controlled through the stub. It seems like the channel would be the most appropriate place to control it.

One thing to consider is that the clients generated by https://github.com/googleapis/toolkit (and checked into https://github.com/GoogleCloudPlatform/google-cloud-java ) don't use stubs at all; they sidestep them. Thus, the ManagedChannel is the only thing in use. (That's why I didn't realize that stubs had that functionality.)

As for grpc being faced with a difficult tradeoff, I think that should be internal to grpc to sort out. The more important thing is that as it stands now, it's not possible to bump up the max size in a non-experimental way.

@carl-mastrangelo
Copy link
Contributor

Oh yeah, in case not obvious, Stubs are just a lightweight wrapper around a ClientCall / ServerCall. Even if GCP doesn't use stubs, it definitely does use Calls. The API exists there too, so there is still a quasi unnecessary dichotomy.

@garrettjonesgoogle
Copy link
Contributor Author

So how are you (grpc) going to decide?

@carl-mastrangelo
Copy link
Contributor

Well, we aren't. I suppose whoever uses which API more will ultimately decide. It absolutely has to be present for implementing Service Config, but so far people tend to only want to set on on a per Channel basis. Both are important use cases, but having both complicates the API. It isn't clear what to do, and after discussing it at length, we didn't come to a conclusion.

If you really want a stable way, you can just use a custom Marshaller that checks the size of the stream as it decodes. When we do decide on a stable API, you can get rid of it.

@ejona86
Copy link
Member

ejona86 commented Mar 6, 2017

I expanded the scope of #2563 to include both APIs.

@ejona86 ejona86 closed this as completed Mar 6, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Sep 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants