Alan Conway wrote:
There's no reason at the AMQP layer why it should be this slow. I
don't know if JMS imposes something that takes a long time - do other
JMS clients have the same problem? If not then it should be fixed. The
"created infrequently" excuse doesn't hold up. e.g. if someone is
writing a command line tool it will connect every time it's run. If
they write a script that uses the tool 100 times they will not be
pleased to wait more than a minute. The slow startup of the management
clients infuriates me for this very reason - its creating a lot of
drag in our own test suite. Apparently this will be better with qmf2,
but i digress.
Hi Alan,
I know I'm not imagining it because I've just done the following:
long _startTime = System.currentTimeMillis();
System.out.println("Create Connection");
Context jndi = new InitialContext(props);
ConnectionFactory connectionFactory =
(ConnectionFactory)jndi.lookup("ConnectionFactory");
connection = connectionFactory.createConnection();
long elapsed = (long)Math.round(System.currentTimeMillis() - _startTime);
System.out.println("Creating connection took " + elapsed);
And it's consistently telling me it's taking between ~ 920 and 990
milliseconds
So that backs up my gut feeling that "it seems a bit slow"
I moved the "_startTime" bit to just before "connection =
connectionFactory.createConnection();" and it was still registering >
900ms so it looks like the problem is somewhere in createConnection().
If someone can suggest something stupid that I might be doing that would
be great, otherwise I'll raise a Jira.
I totally agree that "created infrequently" excuse doesn't hold up -
we're actually scripting qpid-config and qpid-route at the moment to
restart any links that might have died as a result of source broker
restart (we're using queue routes). We've got a large federated topology
and the script can take several minutes to run, which is painful and
results in us restricting how often we run it.
Frase
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]