Dependencies
- Guava version bumped to 20. It is not possible to use older versions of Guava with this version of gRPC. If this proves difficult to handle, please file an issue
- netty: Netty version bumped to 4.1.22-Final. netty-tcnative 2.0.7.Final is still compatible
API changes
- core:
ManagedChannelBuilder.usePlaintext(boolean)
is now deprecated. UseusePlaintext(void)
instead, which is equivalent tousePlaintext(true)
.usePlaintext(false)
was almost always a bug, but is still available by specifyingNegotiationType.PLAINTEXT_UPGRADE
toNettyChannelBuilder
- bazel: grpc-java's Bazel workspace name was renamed to io_grpc_grpc_java. This was done to make the name more unique, since Bazel is now enforcing that users use the same name as in our workspace
New Features
- core: Added ManagedChannel.enterIdle(). It gracefully shuts down any existing connections. This can have multiple uses, but is most immediately useful to allows smooth network interface changes on Android (#3688 #4179)
- core: Added toString() to MethodDescriptor and ServiceDescriptor (#4013)
- inprocess: Added InProcessServerBuilder.generateName(). This is a convenience for making a name instead of manually with UUID or similar
- okhttp: Support for Conscrypt security provider. This allows you to include Conscrypt with your app and not depend on the OS nor Google Play Services Dynamic Security Provider for TLS support
- inprocess: Added
InProcessChannelBuilder.scheduledExecutorService(exec)
to override the default timer executor used by gRPC - okhttp: Added
OkHttpChannelBuilder.scheduledExecutorService(exec)
to override the default timer executor used by gRPC - protobuf: Added
StatusProto.fromStatusAndTrailers()
to convert to acom.google.rpc.Status
directly from aio.grpc.Status
(instead of aStatus*Exception
) - alts: Added ALTS transport for Google Cloud Platform usage. It is similar to mutually authenticated TLS but with different protocol and trust model. ALTS is currently only available for whitelisted projects
- cronet: Added API to apply TrafficStats tag and UID to Cronet GRPC channels (#4208)
Behavior changes
- core: ManagedChannel will now log when orphaned without proper shutdown (#4093)
- core: Use exponential backoff for name resolution. After a NameResolver calls onError(), the channel will now automatically call
refresh()
after a delay. This replaced the hard-coded 60-second retry timer in the DNS name resolver. (#4105) - core: Added an internal panic mode for ManagedChannel. If the channel notices an internal uncaught exception it will attempt to put the channel into a permanent TRANSIENT_FAILURE state instead of hanging (#4023)
- core: Servers that send too many or too few responses for a unary call will now properly see
ServerCall.Listener.onCancel()
called instead ofonComplete()
. The client will now see a cancellation instead of an explicit status message (#3819) - grpclb: Enter fallback mode immediately when balancer and all backend connections are lost (#4007)
Bug fixes
- Reduce false positive results of grpc/grpc-java-api-checker
- core: Close InputStream returned by Marshallers for outgoing messages (#3419)
- core: Fixed channel.getState(true) will not reconnect (#4170)
- netty: Include more details for closure of unknown reason
- netty: Client sends rst stream when server half-closes. This fixes a memory leak when server closes before client half closes (#4275)
- netty: Fixed
ProxySelector
with Netty. This should finally enable the use of forward proxies that require authentication. Users should be able to migrate fromGRPC_PROXY_EXP
to-Dhttps.proxyHost
at this time (#4137) - okhttp: Fixed HPACK reader bug. This resolves an incompatibility with nginx (#4277)
Documentation
- examples: Added a "hello-world" with TLS configured