gRPC and ExtensionRegistry
<p>I am using gRPC with Java, and the messages that I'm sending may contain extensions. In the <a href="https://developers.google.com/protocol-buffers/docs/reference/java-generated#extension" rel="nofollow">Protobuf docs</a> they say:</p>

<pre><code>When parsing a message that might have extensions, you must provide an ExtensionRegistry in which you have registered any extensions that you want to be able to parse.
</code></pre>

<p>The question is how I specify the <code>ExtensionRegistry</code> in the code which uses gRPC as a client (and the message parsing is performed inside the gRPC-generated code).</p>

<p><strong>UPDATE: support for extensions was added to gRPC</strong></p>

<pre><code>ProtoLiteUtils.setExtensionRegistry()
</code></pre>

<p>A note from the developer: <em>This API is not stable, and will very likely change once we have a more appropriate long term solution (with custom registries per method, etc.)</em></p>

<p><a href="https://groups.google.com/forum/#!msg/grpc-io/fk-o9qrXTV0/pppJmG2bBwAJ" rel="nofollow">more info</a></p>