Question · NestJS course · Module 7: Testing
Client emit() and send() methods
How does client.emit() differ from client.send() in NestJS microservices?
Answer options
- emit() is fire-and-forget (does not wait for a response), while send() waits for a response
- emit() always returns a response, while send() does not
- emit() works only with Kafka, and send() only with RabbitMQ
- Both methods are identical and can be used interchangeably
You can check the correct answer by solving this task in the CodeWorlds game.