I am having trouble understanding how to correctly implement streaming when using a grpc client instance.
My Nest app is HTTP however it needs to connect to, and communicate with an external service via gRPC thus we are not performing app.connectMicroservice and not using @Controller for RPC methods.
The client instance exposes several streaming methods but they cannot be used directly and so would like to ask advice on how to wrap/use them in a stream:
Hello,
I am having trouble understanding how to correctly implement streaming when using a grpc client instance.
My Nest app is HTTP however it needs to connect to, and communicate with an external service via gRPC thus we are not performing
app.connectMicroservice
and not using@Controller
for RPC methods.The client instance exposes several streaming methods but they cannot be used directly and so would like to ask advice on how to wrap/use them in a stream:
Dynamic config provided to feature module:
Token injected and retrieve the appropriate service:
Method that is exposed (proto)
rpc SomeMethod(stream SomeData) returns (google.protobuf.Empty) {}
Which is interpreted to the following typescript:
public someMethod(request: SomeDataType): Observable<google.protobuf.Empty>;
How then to use?: