You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by jasmine <ja...@yahoo.com> on 2018/10/01 19:19:31 UTC

Need help on maximumChannelCount

Hi all,

I have a problem when I try to have a lot of sessions need create under one
connection.

If I didn't set anything, JMS will give me error when session reach 256:
Unable to create session, the maximum number of sessions per connection is
256. You must either close one or more sessions or increase the maximum
number of sessions available per connection.

If I set the maximumChannelCount, when the session reach 256, it didn't give
me error. But the process run forever to create a new session.

Here is my testing code:
AMQConnectionFactory connFac = new
AMQConnectionFactory("amqp://localhost/localhost?brokerlist='tcp://localhost:5672'");
            AMQConnection connToBroker = connFac.createConnection("guest",
password);
            connToBroker.setMaximumChannelCount(15000);
            connToBroker.setExceptionListener(new MyExceptionListener());
            connToBroker.start();

            for (int i = 0; i< 3000; i++) {
                Session session = connToBroker.createSession(false,
Session.AUTO_ACKNOWLEDGE);
                System.out.println("Create session: " + i);
            }

After Create session: 255, the process is not response.

When I debug the code, in createSession function in class
AMQConnectionDelegate_0_10, it try to getNextChannelID, _maxChannelID still
255, not increased to MaximumChannelCount I set. So the function
getNextChannelId in class ChannelToSessionMap go to infinite loop.

Is there anyway I can avoid the problem? How can I set the maxChannelID? Or
use a different way to set maximumChannelCount?

Thanks.



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org