You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My stomp version is 1.0.0. ActiveMq version is 5.10.0. When I use topic model of stomp to publish and subscribe, I found that subscriber cannot receive all message from topic when the number of message over 5000. My code is shown below.
receive.php
require_once("Stomp.php");
$con = new Stomp("tcp://localhost:61613");
$con->connect();
$con->subscribe("/topic/test_mq");
$count = 0;
while (true)
{
$msg = $con->readFrame();
if ( $msg != null) {
$count++;
echo "Received message with body '$msg->body':$count\n";
$con->ack($msg);
} else {
echo "Failed to receive a message\n";
}
}
$con->disconnect();
Firstly, I start receive.php. Then I run the send.php. But the receive.php cannot get all the messages. It usually get over 4000, lost the rest of them.
Is it a bug?
The text was updated successfully, but these errors were encountered:
My stomp version is 1.0.0. ActiveMq version is 5.10.0. When I use topic model of stomp to publish and subscribe, I found that subscriber cannot receive all message from topic when the number of message over 5000. My code is shown below.
send.php
require_once("Stomp.php");
$con = new Stomp("tcp://localhost:61613");
$con->connect();
$count = 0;
for ($i = 0; $i < 5000; $i++)
{
$ret = $con->send("/topic/test_mq", "test$i");
if ($ret === true)
{
++$count;
}
}
echo 'send msg:' . $count . "\n";
$con->disconnect();
receive.php
require_once("Stomp.php");
$con = new Stomp("tcp://localhost:61613");
$con->connect();
$con->subscribe("/topic/test_mq");
$count = 0;
while (true)
{
$msg = $con->readFrame();
if ( $msg != null) {
$count++;
echo "Received message with body '$msg->body':$count\n";
$con->ack($msg);
} else {
echo "Failed to receive a message\n";
}
}
$con->disconnect();
Firstly, I start receive.php. Then I run the send.php. But the receive.php cannot get all the messages. It usually get over 4000, lost the rest of them.
Is it a bug?
The text was updated successfully, but these errors were encountered: