|
|||||
|
|
|||||
PHP
Stomp client for PHPOverview[PHP Stomp client|http://code.google.com/p/stompcli/ that supports various connection methods and mechanisms for transforming messages to suitable formats. Check documentation for complete feature list. DownloadDownload the current release from http://code.google.com/p/stompcli/downloads/list Quick StartAfter you download the archive, extract it to your include_path. Once you've done that, you can use the client as follows <?php // include a library require_once("Stomp.php"); // make a connection $con = new Stomp("tcp://localhost:61613"); // connect $con->connect(); // send a message to the queue $con->send("/queue/test", "test"); // 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->body === "test") { echo "Worked\n"; // mark the message as received in the queue $con->ack($msg); } else { echo "Failed\n"; } // disconnect $con->disconnect(); DevelopersSourceUse this command to anonymously check out the latest project source code: svn checkout http://stompcli.googlecode.com/svn/trunk/ stompcli-read-only Unit TestingInstructions on how to set up a unit testing environment could be found here See Also
|
|||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||