Closed Ankurkh1 closed 6 years ago
Hi @Ankurkh1 - thanks for reaching out! Your use case is a valid one for the Get
operation. Unfortunately this operation has not gotten a lot of attention lately. The bug here is the fact that Get uses ChannelCreationMiddleware
which creates a new channel without ever disposing it 🤦♂️. There is no reason why the channel pool isn't used, in fact I really think that it should be.
It seems like you have the basic idea of what to do, I'd be happy to accept a PR for this that:
ChannelCreationMiddleware
with PooledChannelMiddleware
MultipleOperationsTests
so that there is a test for multiple get operations (perhaps as many as the max number of channels?)Hi We are having this issue from our production rabbitmq. Was this issue fixed???
Hi,
I am trying to make use of Get operation. My requirement is that queue will keep accumulating messages and periodically I will run basic get operation to get messages up to a certain limit. While using get I am seeing that system is creating channels on existing connection and but not releasing them. After a few hours I get a "ChannelAllocationException: The connection cannot support any more channels. Consider creating a new connection"
In RabbitMQ management UI, I can see channel count increasing on the same connection for every get. I even tried using new IBusClient for every run by registering IBusclient as transient. Still see the same error.
Is there a reason GetOFTOperation not making use of PooledChannelMiddleware?
Am I doing anything wrong? Any help will be greatly appreciated.