Skip to content

Commit 3557619

Browse files
Update content/microservices/basics.md
1 parent 431a3bf commit 3557619

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/microservices/basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ The request-response message style is useful when you need to **exchange** messa
9797

9898
To enable the request-response message type, Nest creates two logical channels - one is responsible for transferring the data while the other waits for incoming responses. For some underlying transports, such as [NATS](https://nats.io/), this dual-channel support is provided out-of-the-box. For others, Nest compensates by manually creating separate channels. There can be overhead for this, so if you do not require a request-response message style, you should consider using the event-based method.
9999

100-
To create a message handler based on the request-response paradigm use the `@MessagePattern()` decorator, which is imported from the `@nestjs/microservices` package. This decorator is only registered for [controllers](https://docs.nestjs.com/controllers) since they are the entry points for your application: it would be bad practice to distribute `@MessagePattern()` decorators throughout the application code.
100+
To create a message handler based on the request-response paradigm use the `@MessagePattern()` decorator, which is imported from the `@nestjs/microservices` package. This decorator should be used only within the [controller](https://docs.nestjs.com/controllers) classes since they are the entry points for your application. Using them inside providers won't have any effect as they are simply ignored by Nest runtime.
101101

102102
```typescript
103103
@@filename(math.controller)

0 commit comments

Comments
 (0)