← All interview questions

Skill Zuno · skillzunos.com · Fullstack Pro

NestJS Micro Service interview questions

Prepare for NestJS Micro Service interviews on Skill Zuno. This practice book covers NestJS Micro Service interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.

Open NestJS Micro Service on Skill Zuno

Also see the NestJS Micro Service tutorial.

NestJS has built-in support for microservices, letting services communicate over transports such as TCP, Redis, NATS, Kafka, RabbitMQ and gRPC with the same decorators used for HTTP. Message patterns and event patterns map incoming messages to handlers. Interviews cover transports, request-response versus events, hybrid applications, an API gateway, error handling and observability across NestJS services.

Sample NestJS Micro Service interview questions

What is the difference between @MessagePattern and @EventPattern?

@MessagePattern handles request-response messages, so the caller waits for a reply via send(). @EventPattern handles events sent with emit(), which expect no reply and may have several listeners.

How does one NestJS service call another?

Register a ClientProxy with ClientsModule for the chosen transport, inject it, and call client.send(pattern, data), which returns an observable of the reply.

What is a hybrid application in NestJS?

An app that listens on HTTP and one or more microservice transports at once, created with connectMicroservice() and startAllMicroservices().

How do you handle errors between NestJS microservices?

Throw RpcException in the service, add exception filters to map errors, and on the caller apply timeouts and catchError so one slow service does not hang requests.

When would you use Kafka instead of TCP as the transport?

When you need durable, replayable events consumed by many services and high throughput. TCP suits simple synchronous calls between a few services.

What you can practice

  • NestJS Micro Service interview questions for beginners and experienced developers
  • Level-based practice: New, Easy, Medium, Hard, and Diff
  • Fullstack Pro topics alongside NestJS Micro Service on skillzunos.com

More Fullstack Pro interview questions

All interview questions