Testing gRPC Client Streaming Mthods

Before we start

First thing we need to create a gRPC service that has a server streaming method. For this tutorial, we will run the gRPC service found at https://github.com/namigop/grpctutorials/tree/main/ClientStreaming

This service has the following server streaming method

rpc SendNotifications(stream NotificationsRequest) returns (NotificationsResponse);   

Test the service

Start the gRPC service

Start FintX then click on the plus icon to add a client. The value entered in the http address should match the running service

Click Okay

Once the gRPC client is created and displayed int he UI, double-click on the method to open it in a tab

Click the Run button

If the response from the service is successful, the Client Stream request panel will be enabled

Enter the values to the request stream then click on the “Write to request stream” button. Write as many messages to the request stream as you want. Once finished, click on the “Finish writing to the request stream” button. The server responds with the final message (shown below).

Leave a Reply

Your email address will not be published. Required fields are marked *