activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dead_devil_66 <>
Subject Stomp causing error 500 when connecting
Date Mon, 25 Jul 2011 04:35:43 GMT

I'm just trying to run some php examples with Stomp. I have created a broker
in port 61616. But, when i try to run the connectivity.php example that
comes in the stomp bundle, i get an 500 error. To be more precise, an error
in this line:

        $frame = $this->readFrame();

Well, i think that it's that line because, after using the
ExceptionThrower.php, from
this site , the Exception object says that the error is in that line.

My code:

// include a library
// make a connection
$con = new Stomp("tcp://localhost:61616");

   // connect

catch (Exception $ex)
   // handle or re-throw exception


// send a message to the queue
$con->send("/queue/test", "test");
echo "Sent message with body 'test'\n";
// subscribe to the queue
// receive a message from the queue
$msg = $con->readFrame();

// do what you want with the message
if ( $msg != null) {
    echo "Received message with body '$msg->body'\n";
    // mark the message as received in the queue
} else {
    echo "Failed to receive a message\n";

// disconnect

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message