How to use the @nestjs/microservices.Transport.RMQ function in @nestjs/microservices

To help you get started, weโ€™ve selected a few @nestjs/microservices 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 nestjs / nest / integration / microservices / e2e / broadcast-rmq.spec.ts View on Github external
beforeEach(async () => {
    const module = await Test.createTestingModule({
      controllers: [RMQBroadcastController],
    }).compile();

    server = express();
    app = module.createNestApplication(server);
    app.connectMicroservice({
      transport: Transport.RMQ,
      options: {
        urls: [`amqp://admin:admin@localhost`],
        queue: 'test',
        queueOptions: { durable: false },
      },
    });
    app.connectMicroservice({
      transport: Transport.RMQ,
      options: {
        urls: [`amqp://admin:admin@localhost`],
        queue: 'test',
        queueOptions: { durable: false },
      },
    });
    await app.startAllMicroservicesAsync();
    await app.init();
github nestjs / nest / integration / microservices / e2e / sum-rmq.spec.ts View on Github external
beforeEach(async () => {
    const module = await Test.createTestingModule({
      controllers: [RMQController],
    }).compile();

    server = express();
    app = module.createNestApplication(server);
    app.connectMicroservice({
      transport: Transport.RMQ,
      options: {
        urls: [`amqp://localhost:5672`],
        queue: 'test',
        queueOptions: { durable: false },
      },
    });
    await app.startAllMicroservicesAsync();
    await app.init();
  });
github nestjs / nest / integration / microservices / e2e / broadcast-rmq.spec.ts View on Github external
const module = await Test.createTestingModule({
      controllers: [RMQBroadcastController],
    }).compile();

    server = express();
    app = module.createNestApplication(server);
    app.connectMicroservice({
      transport: Transport.RMQ,
      options: {
        urls: [`amqp://admin:admin@localhost`],
        queue: 'test',
        queueOptions: { durable: false },
      },
    });
    app.connectMicroservice({
      transport: Transport.RMQ,
      options: {
        urls: [`amqp://admin:admin@localhost`],
        queue: 'test',
        queueOptions: { durable: false },
      },
    });
    await app.startAllMicroservicesAsync();
    await app.init();
  });
github nestjs / nest / integration / microservices / src / rmq / rmq.controller.ts View on Github external
constructor() {
    this.client = ClientProxyFactory.create({
      transport: Transport.RMQ,
      options: {
        urls: [`amqp://localhost:5672`],
        queue: 'test',
        queueOptions: { durable: false },
        socketOptions: { noDelay: true },
      },
    });
  }
github nestjs / nest / integration / microservices / src / rmq / rmq-broadcast.controller.ts View on Github external
constructor() {
    this.client = ClientProxyFactory.create({
      transport: Transport.RMQ,
      options: {
        urls: [`amqp://localhost:5672`],
        queue: 'test_broadcast',
        queueOptions: { durable: false },
        socketOptions: { noDelay: true },
      },
    });
  }