Foo-Foo-MQ / foo-foo-mq

Abstractions around RabbitMQ
MIT License
48 stars 24 forks source link

Cant control how many channels I can open #19

Open rafasimao opened 3 years ago

rafasimao commented 3 years ago

When I start my rabbit connection, it creates a connection with 4 channels(which I dont know why since I am using only one queue and one publisher) and a maximum of 2047 channels on that connection. I would like to change at least the number of initial channels, because for my peculiar case I would like to reduce the number of opened channels.

Is there anyway I can do it? Would it be possible to add it as an option in the connection config options?

zlintz commented 3 years ago

@rafasimao can you provide more context on your need and your configuration? How many publishers and subscribers are you running in one node process? Is your concern on the RabbitMq side or your application?

This past issue may be related to what you are requesting https://github.com/arobson/rabbot/issues/134 as well

rafasimao commented 3 years ago

Hi, @zlintz, as I understood, by default the lib creates two channels, one to send and another to receive(I figure), plus one channel for the replyQueue when enabled, plus one channel per queue. For the most scenarios it seems okay, however some times we wish just to publish messages in one application and just subscribe in another, and if I have many workers subscribing even though they can be listening to more then one queue it may be okay for me to have only one channel per worker. For my specific case I managed to keep it down to two channels and it is okay, but I wish there where more possible configurations so that I could manage it differently in each scenario.