0

How do I set rabbitMQ connection name so it displays on management console using NestJS?. I don't see any option for that in RmqOptions interface.

I want to set friendly name for the connection like in this post: Set connection name with amqplib

I've dome research on web. Reffered to NestJS docs and looked into code.

1 Answers1

1
this.app.connectMicroservice<MicroserviceOptions>(
      {
        transport: Transport.RMQ,
        options: {
          queue: this.queueName,
          urls: [this.host],
          prefetchCount: 1,
          headers: {
            ['state']: 'initial',
          },
          noAck: false,
          noAssert: true,
          persistent: true,
          queueOptions: {
            durable: false,
            messageTtl: 700,
          } as AmqplibQueueOptions,
          socketOptions: {
            clientProperties: {
              connection_name: '<NAME_YOUR_CONNECTION_HERE>',
            },
          } as AmqpConnectionManagerSocketOptions,
        },
      },
      { inheritAppConfig: true },
    )
VyTor BrB
  • 81
  • 8