EasyNetQ icon indicating copy to clipboard operation
EasyNetQ copied to clipboard

increasing threads in client

Open askdong opened this issue 6 years ago • 4 comments

Hi Brother,

we use EasyNetQ to publish message every 5 minutes in client, If RabbitMQ highwater mark(either disk space or memory) is reached, RabbitMQ Server will refuse any client incoming message, which will cause client application threads count to increase to more than thousands. how to solve this problem? is is possible to pre-check highwater mark in client before publish message? thank you!

askdong avatar Oct 28 '19 03:10 askdong

Hi, I am not a contributor of easynetq and I know this is an old issue. Did you give the Blocked event in the Advanced bus a try?

jochenkluger avatar Mar 04 '20 11:03 jochenkluger

how do i get the blocked event? is there a way to register that event so client application can be notified when blocked event is raised?

askdong avatar Mar 04 '20 11:03 askdong

Does this code help? `var rabbitBus = RabbitHutch.CreateBus(connectionString);

rabbitBus.Advanced.Blocked += (sender, args) => { consoleLogger.Error("BusConnection Blocked! {reason}", args.Reason); };`

jochenkluger avatar Mar 04 '20 12:03 jochenkluger

It seems that #1056 will help to not increase threads, but anyway we should consider how to deal with blocked event.

Pliner avatar May 21 '20 19:05 Pliner

This issue seems to be outdated. If it still persists or anyone has any suggestions how blocked event should be handled - feel free to reopen.

Pliner avatar Sep 03 '22 16:09 Pliner