#Is the microservice package (using Redis) supposed to log twice?

20 messages · Page 1 of 1 (latest)

urban pasture
#

Title is self explanatory, I just need to know if the microservice registration is supposed to log twice, I am not sure how to prevent it if not.

flat mountain
#

Do you add the ClientsModule.register() to multiple modules?

urban pasture
#

Nope

#

Here is what I have:

#

It's towards the bottom off this image, only in this global module.

#

The only module I am this module in is the app module, unless I shouldn't be

flat mountain
#

Hmmm, that seems a bit interesting

urban pasture
#

Yea.

flat mountain
#

Can you provide a quick reproduction with this?

urban pasture
#

Yeah, I'll try and keep it simple

#

hold on im improving the reproduction

#

Also, the goal with this is to be able to use the .send method and receive that message data from another nest application in a different docker container. As of now, the receiving container does not successfully receive the message and I am not sure why or if it's related to this.

urban pasture
flat mountain
#

Good to know. I'll be trying to look into it here soon. Day job has been taking my attention

urban pasture
#

No worries, thank you

rancid badger
#

I've been also noticing creation of the same service several times after updating to nestjs v11 (I noticed it because it logged the message from the init method several times)

My problem is not related to Redis, just in my other two services that ai tried to update from nestjs v10

urban pasture
drowsy yarrow
# urban pasture Okay, the current build reproduces the steps:

Do you have more than one client (inside clients module?)

By reading the code, you should see one log per client that you declare in that list due to:

Experiment changing the moduleIdGeneratorAlgoritm to deep-hash in the createApp (https://docs.nestjs.com/migration-guide#module-resolution-algorithm)

GitHub

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀 - nestjs/nest

urban pasture