Skip to content

RabbitMQ: RabbitSubscribe using a handler name without corresponding handler config asserts randomized queues #722

@ckfngod

Description

@ckfngod

Similar to #667

If I use RabbitSubscribe with a handler name but do not provide a corresponding handler config to RabbitMQModule then amq.gen-* queues are asserted. For example:

Given handlers:

@RabbitSubscribe({ name: 'handlerA' })
handlerA() { ... }

@RabbitSubscribe({ name: 'handlerB' })
handlerB() { ... }

@RabbitSubscribe({ name: 'handlerC' })
handlerC() { ... }

With RabbitMQModule config:

{
  handlers: {
    handlerA: [{ ... }],
    handlerB: [],
  },
  ...
}

Then a amq.gen-* queue is asserted because of the missing handlerC property in the config object. The empty array for handlerB does not cause a amq.gen-* queue to be asserted.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions