question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: channel is not available

See original GitHub issue

I’m creating an API which will accept the message and then will publish it to the queue.

So i have initialized my app.module.ts

@Module({
  imports: [
     RabbitMQModule.forRootAsync(RabbitMQModule, {
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: (configService: ConfigService) => ({
        uri: configService.get('RABBIT_MQ_URI')
      })
    }),
  ],
  controllers: [AppController],
  providers: [
    AppService
  ],
})
export class AppModule {}

And in the service imported the library AMQPService like this constructor(private readonly amqpConnection: AmqpConnection){}

So when, using the methods exposed like this this.amqpConnection.channel.assertExchange(exchange.name, exchange.type, exchange.options); and it throws Error: channel is not available.

When logged amqpConnection, recieved this object

AmqpConnection {
  messageSubject: Subject {
    closed: false,
    currentObservers: null,
    observers: [],
    isStopped: false,
    hasError: false,
    thrownError: null
  },
  logger: Logger { context: 'AmqpConnection', options: {} },
  initialized: Subject {
    closed: false,
    currentObservers: null,
    observers: [],
    isStopped: false,
    hasError: false,
    thrownError: null
  },
  _managedChannels: {},
  _channels: {},
  config: {
    prefetchCount: 10,
    defaultExchangeType: 'topic',
    defaultRpcErrorBehavior: 'REQUEUE',
    defaultSubscribeErrorBehavior: 'REQUEUE',
    exchanges: [],
    defaultRpcTimeout: 10000,
    connectionInitOptions: { wait: true, timeout: 5000, reject: true },
    connectionManagerOptions: {},
    registerHandlers: true,
    enableDirectReplyTo: true,
    channels: {},
    enableControllerDiscovery: false
  }
}

Expectations:

  • Should be able to assert an exchange.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
nitobacommented, Apr 24, 2022

I think this is bug of the version 2.3.0 In version “@golevelup/nestjs-rabbitmq”: “2.2.0” all works fine

0reactions
fmalkcommented, Jul 29, 2022

Since we’re still using 2.2 for our backend, best if we tried to update it to current version and see if problem persist. However that’s not a priority. When that happens, I’ll report back here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trying to remedy the "Channel is currently unavailable" error
Solved: I started getting "channel not available" errors a couple weeks ago on our main (living room) DVR STB as well as pixelation,...
Read more >
Get Help With Channel Not Available Error - DIRECTV
Learn how to troubleshoot the Channel Not Available error message.
Read more >
Error channel not available. Staging setup - Ross-Tech Forums
Hi. Can not setup staging in a car mk6. I can try this configurations: - module 17 instruments - UDS adaptation - Channel...
Read more >
How to fix the error “Channel not found in ... - YouTube
How to fix the error “ Channel not found in installation skipping load routine” while opening LumionWe face many problems while using Lumion ......
Read more >
Why Does YouTube Have "This Channel Is Not Available"?
Channel Has Been Closed. A YouTube channel may be listed as unavailable if the owner has closed the YouTube account for that specific...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found