activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erlend Aakre <erlend.aa...@intrapoint.com>
Subject activemq Stomp/php freezes, slow consumer, not in queue
Date Fri, 23 Nov 2007 11:47:57 GMT

I have a installation of activemq using mysql and journaling, everything is
working ok. There are like 150 simple messages in journal and around 250 in
database. All added by simple stomp example:

require_once 'Stomp.php';

$c = new StompConnection("localhost");
$c->connect("user", "pass");
$c->send("/queue/myqueue", "msg: " . $_GET["msg"] . $i);
$c->disconnect();

This works great, and I'm able to add lots of messages (even when having a
loop that thousands of messages) and it's super fast and uses almost no cpu.

however, when I try to read the messages with a simple stomp client, things
get very slow and when I press updates it takes 1.5-5.5 seconds to load page
but sometimes it happens in 0.2 sec which is as expected. also the messages
are NOT in the order I put them in, I used a for loop which appends the
number of the iteration in the message. I had several test messages in the
queue from when the loop was going from 1 to 50.. I click update and I see
the following:
*click*:  message= my old message 36
*click*:  message= my old message 37
*click*:  message= my old message 38
*click*:  message= message 850
*click*:  message= my old message 39

Sometimes the consumer also stops up completely and just stands there
forever.
Anyone have any clues on what might be wrong? The install is pretty out of
the box, and using the stomp client from stomp.codehause.org. activemq
4.1.1, java 1.6.. activemq's memory limit is set to 80MB and it has
allocated all of it. Other resources on the webserver work as normal when
the php consumer is halted.

consumer:
require_once 'Stomp.php';
$c = new StompConnection("localhost");
$c->connect("user", "pass");

$c->subscribe("/queue/myqueue");
$msg = $c->readFrame();

echo "<html><body>";
echo "MESSAGE<br>";
echo $msg->body;
echo "</body></html>";

$c->acknowledge($msg->headers["message-id"]);
$c->disconnect();
-- 
View this message in context: http://www.nabble.com/activemq-Stomp-php-freezes%2C-slow-consumer%2C-not-in-queue-tf4861208s2354.html#a13910928
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message