nestjs / cqrs

A lightweight CQRS module for Nest framework (node.js) :balloon:
https://nestjs.com
MIT License
820 stars 149 forks source link

CQRS module lack of support microservices #1694

Closed vlbras closed 2 months ago

vlbras commented 2 months ago

Is there an existing issue for this?

Current behavior

When @nestjs/microservices is used with @nestjs/cqrs and app.listen(PORT) wasn't specified in main.ts, app throws errors for commands, queries and events.

Error example: The query handler for the "cbad2186-947e-4420-819f-aad9259c54b6" query was not found! */

Minimum reproduction code

https://github.com/vlbras/test-cqrs-microservices

Steps to reproduce

  1. npm i
  2. docker compose up
  3. npm run start:dev

Expected behavior

Following configuration should not break CQRS module.

Package version

10.2.7

NestJS version

10.0.0

Node.js version

18.10.0

In which operating systems have you tested?

Other

No response

vlbras commented 2 months ago

not a bug, need to use await app.init()