activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: Stomp causing error 500 when connecting
Date Mon, 25 Jul 2011 12:32:26 GMT
Are you sure there's a stomp transport listening on 61616, e.g.

<transportConnector uri="stomp://localhost:61616 />

in your activemq.xml


Regards
-- 
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Mon, Jul 25, 2011 at 6:35 AM, dead_devil_66 <deathdevil66@hotmail.com>wrote:

> Greetings.
>
> 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
>
> http://code.google.com/p/phreeze/source/browse/trunk/phreeze/includes/verysimple/Util/ExceptionThrower.php?spec=svn254&r=254
> this site , the Exception object says that the error is in that line.
>
> My code:
>
> <?php
> // include a library
> require_once("Stomp.php");
> require_once("ExceptionThrower.php");
> // make a connection
> $con = new Stomp("tcp://localhost:61616");
> try
> {
>
>   ExceptionThrower::Start();
>   // connect
>   $con->connect();
>   ExceptionThrower::Stop();
>
> }
> catch (Exception $ex)
> {
>   ExceptionThrower::Stop();
>   // handle or re-throw exception
>        print_r($ex);
>
> }
>
> /*
> // send a message to the queue
> $con->send("/queue/test", "test");
> echo "Sent message with body 'test'\n";
> // subscribe to the queue
> $con->subscribe("/queue/test");
> // 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
>    $con->ack($msg);
> } else {
>    echo "Failed to receive a message\n";
> }
>
> // disconnect
> $con->disconnect();
> */
> ?>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Stomp-causing-error-500-when-connecting-tp3691651p3691651.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message