#Can i use nest commander and emit events to rabbitmq?

2 messages · Page 1 of 1 (latest)

fringe sedge
#

I got this service that start with a cli command with nest commander and later at the end of the execution i need to make it emit events to rabbitmq but idk if i can have nest commander working together to rabbitmq conecction. because i see that for making nestjs commander work i have to use:

await CommandFactory.run(AppModule, {logger:['warn', 'error'],}); 

at main.ts and for getting rabbitmq working the documentation shows:

    AppModule,
    {
      transport: Transport.TCP,
    },
  );
  await app.listen();
zenith night
#

To connect to the RabbitMQ microservice, you can use the ClientsModule to create the connection. The createMicroservice is for a microservice server