I'm using PHP STOMP to read messages from activemq.  I am able to read one
message and then hasFrameToRead will always return false.  I switched to
Java to get the project out the door but want to solve this issue because
we'll want to talk to activemq from multiple languages.  I'm using version
5.3.  Here's the basic code:

public function getMessages(){

                $con = new Stomp(MESSAGING_BROKER_URL);
                $con ->connect('system','manager');
                $con->subscribe(MESSAGING_QUEUE_NAME);


                $messages = array();
                while($con->hasFrameToRead()){

                        $message = $con->readFrame();
                        $body = $message ->body;
                        $headers = $message ->headers;
                        $messageId = $headers['message-id'];
                        $messages[$messageId] = $body;


                }

                $con ->disconnect();
                return $messages;


        }

-- 
View this message in context: 
http://old.nabble.com/hasFrameToRead-always-returns-false-after-first-message-tp26308746p26308746.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to