[ ] Regression
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Is there any roadmap to support EventStore transport layer support? In the meantime how to implement nest microservices with Event store in right way?
Found an interesting article on this topic Medium Micorservices Article, with an example implementation Github Example-nodejs-cqrs-es-swagger, sadly it's for nestjs 5.x and i like to use 6.x for the query-bus.
The problem is that he uses the onModuleInit()
function and it is not working in the same way in 6.0 (I become this error-message: There is no matching event handler defined in the remote service
)
EDIT:
You have to use @EventPattern
instead of @MessagePattern
in the users.controller.ts
and change the onModuleInit()
function to
onModuleInit() {
this.eventStore.setEventHandlers(this.eventHandlers);
this.eventStore.bridgeEventsTo((this.event$ as any).subject$);
this.event$.publisher = this.eventStore;
}
@bissel Would you like to share your solution on Github, that would possibly help me with my problem.
I have currently problems getting the bridgeEventsTo() function to work.
@Bissel Can you clarify your solution? In these project work only commands. Sagas and also events do not work. How to force saga to work?
W are actively working on updating the documentation to provide more and more examples. Hopefully, we'll deliver something on event store implementation shortly.
You could use this https://github.com/juicycleff/nestjs-event-store
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Found an interesting article on this topic Medium Micorservices Article, with an example implementation Github Example-nodejs-cqrs-es-swagger, sadly it's for nestjs 5.x and i like to use 6.x for the query-bus.
The problem is that he uses the
onModuleInit()
function and it is not working in the same way in 6.0 (I become this error-message:There is no matching event handler defined in the remote service
)EDIT:
You have to use
@EventPattern
instead of@MessagePattern
in theusers.controller.ts
and change the
onModuleInit()
function to