Complete the code to set the transport type for a microservice in NestJS.
const microservice = app.connectMicroservice({ transport: Transport.[1] });The Transport.TCP option sets the microservice to use TCP transport, which is common for NestJS microservices.
Complete the code to create a microservice client using Redis transport in NestJS.
const client = ClientProxyFactory.create({ transport: Transport.[1], options: { url: 'redis://localhost:6379' } });The Transport.REDIS option configures the client to use Redis as the transport layer for messaging.
Fix the error in the microservice setup by selecting the correct transport option.
app.connectMicroservice({ transport: Transport.[1] });For gRPC transport, use Transport.GRPC to properly configure the microservice.
Fill both blanks to configure a microservice with MQTT transport and specify the broker URL.
app.connectMicroservice({ transport: Transport.[1], options: { url: '[2]' } });Use Transport.MQTT for MQTT transport and specify the broker URL like mqtt://broker.hivemq.com.
Fill all three blanks to create a client proxy with NATS transport, specify the URL, and set the queue name.
const client = ClientProxyFactory.create({ transport: Transport.[1], options: { url: '[2]', queue: '[3]' } });Use Transport.NATS for NATS transport, specify the NATS server URL, and set the queue name as needed.