mimiz/rabbitmq-event-manager

View on GitHub
src/adapter/helper/consume.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function consume has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function consume(channel: amqp.Channel, queueName: string, listener: ConsumeHandlerFunction, options: IEventManagerOptions): Promise<IEventPayload | void | null> {
  LOGGER.info(`Consume messages of queue  ${queueName}`);
  return new Promise((resolve, reject) => {
    try {
      channel.consume(queueName, message => {
Severity: Minor
Found in src/adapter/helper/consume.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status