Skip to content

Microservice health indicator does not throw an error when RMQ connection is down #1891

Closed
@BrunnerLivio

Description

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

In case the RMQ connection is down, the health indicator will be displayed as "down" but the health check is still healthy.

Minimum reproduction code

Given the following health check:

return this.health.check([
      () =>
        this.disk.checkStorage('disk', { path: '/', thresholdPercent: 0.5 }),
      () =>
        this.microservice.pingCheck('tcp', {
          transport: Transport.RMQ,
          options: {
            urls: ['amqp://localhost:5672'],
            queue: 'cats_queue',
            queueOptions: {
              durable: false,
            },
          },
        }),
    ]);

In case RMQ is down the health check will still be seen as healthy.

Steps to reproduce

No response

Expected behavior

It should be unhealthy

Package version

8.1.0

NestJS version

8.x.x

Node.js version

16.x.x

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions