Use multiple microservices transports in single app, for example combine gRPC and Kafka, now I got issue with decorators in controllers, Kafka trying connect by arguments from '@GrpcMethod', but decorator GrpcMethod generate JSON object for pattern which invalid as name os Kafka topic.
[ServerKafka] ERROR [Connection] Response Metadata(key: 3, version: 5) {"timestamp":"2020-05-08T19:58:06.967Z","logger":"kafkajs","broker":"localhost:9092","clientId":"events-api-server","error":"The request attempted to perform an operation on an invalid topic","correlationId":1,"size":145} +73ms
(node:53226) UnhandledPromiseRejectionWarning: KafkaJSProtocolError: The request attempted to perform an operation on an invalid topic
@nestjs/microservices/server/server-kafka.js:65:9
In general all MessagePattern result processed by all microservices transports.
https://gist.github.com/barbarosh/a73eb0aecda5c70c0d9341f05b4bd849
I expected what data from GrpcMethod should read only by ServerGrpc.
Pass type of transport for each MessagePattern for separate
Nest version: 7.0.9
For Tooling issues:
- Node version: 12
- Platform: Mac
Others:
I am facing similar issues. Seems like Nest message pattern is designed only for one type of the transport.
@paul-ihnatolia
Seems like Nest message pattern is designed only for one type of the transport.
It happens only if you combine gRPC with other transporters.
@barbarosh thanks for reporting. I'll review your PR shortly.
Added in 7.1.0. Thanks!