Saturday, 15 June 2013

multithreading - RabbitMQ - Close Idle/dangling channels -



multithreading - RabbitMQ - Close Idle/dangling channels -

i have multi-threaded application publishes incoming messages rabbitmq exchange. using rabbitmq java client, create single rabbitmq connection @ application startup , share across threads. each thread creates new channel (threadlocal) channels not shared across multiple threads recommended rabbitmq documentation. using netty , see same number of rabbitmq channels beingness created netty channel pipeline threads. far good.

however, have maintain live time of 2 mins on netty threads (i need , cannot alter it). so, if thread idle 2 mins dies. however, channel associated thread isn't killed , remains idle until connection closes. thus, increasing list of channels idle , never closed. did not see in rabbitmq documentation addresses issue of dangling channels. there way me close channel has been idle period of time? if not, what's best alternative resolve this?

you utilize rabbitmq management http api , list channels, on details of each channel can see since when channel idle, , react accordingly, closing channel example.

see here: http://hg.rabbitmq.com/rabbitmq-management/raw-file/3646dee55e02/priv/www-api/help.html

multithreading rabbitmq netty channels

No comments:

Post a Comment