#retryAttempts doesn't retry after fail for TCP transporter

1 messages · Page 1 of 1 (latest)

lofty isle
#

I set theses options in the message consumer:

  app.connectMicroservice<MicroserviceOptions>({
    transport: Transport.TCP,
    options: {
      host: '127.0.0.1',
      port: 4000,
      retryAttempts: 3,
      retryDelay: 3000,
    },
  })

I'm throwing an error when the logic fail in the controller

  @EventPattern('example_msm')
  async exapleMSM(message: exampleMSMDto): Promise<ExampleMSMResultDto> {
    try{
    ...
    } catch (error) {
      throw new RpcException(error.message)
    }
  }

however it doesn't retry when it fails

dim mountain
#

can you run npx nest info

lofty isle
#

yes sure:

[System Information]
OS Version     : Linux 6.3
NodeJS Version : v16.14.0
YARN Version    : 1.22.19 

[Nest CLI]
Nest CLI Version : 9.1.9 

[Nest Platform Information]
platform-express version : 9.4.0
microservices version    : 9.4.1
schematics version       : 9.0.4
passport version         : 9.0.3
swagger version          : 6.2.1
typeorm version          : 9.0.1
testing version          : 9.3.2
common version           : 9.4.1
config version           : 2.3.0
axios version            : 2.0.0
core version             : 9.4.1
jwt version              : 10.0.2
lofty isle
dim mountain
#

I don't think so

lofty isle
#

Ok my issue created few minutes before was closed inmediately https://github.com/nestjs/nest/issues/11936 however I see this as a bug because according documentation if message fail with RpcException it should retry if I set retryAttempts and retryDelay

GitHub

Is there an existing issue for this? I have searched the existing issues Current behavior I set a microservice with retryAttempts 5 and retryDelay 3000 however it doesn't retry the message afte...

lofty isle
lost oriole
lofty isle