PreviousNext

Getting Started with gRPC Client Factory

by bill-s, 2019-08-19T23:29:44.027Z

Regular visitors of my blog will know that I’ve written a lot of posts about the HttpClientFactory feature, available in the Microsoft.Extensions.Http package which simplifies the consumption and proper lifetime usage of HttpClient instances. Recently, I’ve begun digging into gRPC and I’m pleased to see a similar pattern is available for gRPC-based communication. In this post, I want to show a quick example of how to get started with the gRPC Client Factory. I’m going to focus on adding this to an ASP.NET Core 3.0 web project, which will act as a client of an external gRPC service. This post assumes a little knowledge about gRPC. You can read my earlier blog post (slightly outdated now) which covers some extra ground.

Read More