[rabbitmq-discuss] lots of channel getting created

pradeep w hpk.warrier at gmail.com
Sat Jan 7 07:27:42 GMT 2012

 I have doubt/issue regarding new channel creation. In my application I run
periodic jobs to make and publish message relevant for respective client.
Client acknowledges all the messages on consumption also

My code looks as below:

 message publication

            ConnectionFactory factory = new ConnectionFactory();
>             factory.setHost("localhost");
>             Connection connection = factory.newConnection();
>             Channel channel = connection.createChannel();
>             String queuename = getOBQueueName(clientId);
>             channel.queueDeclare(queuename, true, false, false, null);
 /**  make the message **/
channel.basicPublish("", queuename, MessageProperties.PERSISTENT_BASIC,
> message.getBytes());

>             connection.close();

However after a while [in the management console] I see a lot of channels
[as of now more than 1000]. And most of these are not being used at all.

I would like to understand what is going wrong here.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120107/9859ec3e/attachment.htm>

More information about the rabbitmq-discuss mailing list