How to use haredo - 2 common examples

To help you get started, we’ve selected a few haredo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bamlab / nest-rabbit-tasks / src / nest-rabbit-tasks.rabbitClient.ts View on Github external
public static async buildQueueConnection(option: NestRabbitTasksQueueOptions, logger: Logger): Promise {
    const connection = new Haredo({ connection: option.amqpOptions.connectionUrl });

    if (option.globalOptions.immutableInfrastructure) {
      const channel = await connection.connectionManager.getChannel();
      try {
        await channel.checkQueue(option.entity.queueName);
      } catch (err) {
        if (err.code === 404) {
          const msg = `You have activated "globalOptions.immutableInfrastructure".
          This prevents nest-rabbit-tasks to create non-existent queue.
          The queue ${option.entity.queueName} does not exist.
          Please create it in RabbitMQ interface.`;
          return null;
        throw err;
github bamlab / nest-rabbit-tasks / src / nest-rabbit-tasks.module.ts View on Github external
public onModuleInit() {
      error: this.logger.error.bind(this.logger),
      info: this.logger.log.bind(this.logger),
      debug: this.logger.debug.bind(this.logger),


A type-safe client library for rabbitmq/amqp

Latest version published 1 month ago

Package Health Score

73 / 100
Full package analysis

Popular haredo functions

Popular JavaScript code snippets

Find secure code to use in your application or website