views:

42

answers:

0

I am connecting to Active via PHP Stomp client as publisher. So the arch. is

 - HTTP Request to PHP
 - Connect to ActiveMQ
 - Publishe message to a topic
 - Disconnect

However, after sometime the I can see bunch of active connection under Stomp Connector under Admin section http://:8161/admin/connections.jsp

Few entries are as following

Name                                              Remote Address             Active   Slow
ID:ACTIVEMQ-HOST-55619-1284071501902-4:1063968 /WEB-SERVER-IP:59573 true false
ID:ACTIVEMQ-HOST-1284071501902-4:1071105 /WEB-SERVER-IP:44654 true false

PHP Code used to connection and publishing

// include a library
require_once("Stomp.php");
//checking the hostname
$con = new Stomp("tcp://localhost:60000"); // localhost
if ($con) {
    // connect
    $con->connect("", "");//
    echo "Connected!!!\n";
    // send a message to the queue
    $con->send("/topic/stomp-bleeding", "test", array('persistent'=>'true'));
    // disconnect
    $con->disconnect();
    echo "Disconnected!!!\n";
}

-Rohit