Key points for gRPC server streaming with Traffic Parrot:
- There is one request and multiple responses per RPC call
- Traffic Parrot represents this as multiple request/response mappings
- Each mapping has a MessageNumber in the mapping file that represents the order of the responses
- Each mapping has a CallId in the mapping file that represents which RPC call the mapping belongs to
- The request matcher is duplicated for each mapping

In this example:
- These mappings form a server streaming response with 3 elements:
  * {"RequestName": "example-multi-response"} is the equalToJson request matcher
  * example.01.ExampleService-ExampleOperation[OK].json
  * example.02.ExampleService-ExampleOperation[OK].json
  * example.03.ExampleService-ExampleOperation[OK].json

- This mapping forms a server streaming response with 1 element:
  * {"RequestName": "example-single-response"} is the equalToJson request matcher
  * example.04.ExampleService-ExampleOperation[OK].json

- gRPC mappings are placed in the "grpc-mappings" directory
- gRPC proto files are placed in the "proto" directory
- The default non-TLS port is 5552

Sample https://github.com/fullstorydev/grpcurl testing: 

grpcurl -proto example.proto -plaintext -d '{"RequestName": "example-multi-response"}' localhost:5552 example.ExampleService/ExampleOperation
{
  "Success": {
    "StringValue": "some-string-value"
  }
}
{
  "Error": {
    "ErrorMessage": "some-error-message"
  }
}
{
  "Success": {
    "FloatValue": 1.234
  }
}

grpcurl -proto example.proto -plaintext -d '{"RequestName": "example-single-response"}' localhost:5552 example.ExampleService/ExampleOperation
{
  "Error": {
    "ErrorMessage": "example-single-response"
  }
}

For more information please contact support@trafficparrot.com

