Print
PHP

Stomp client for PHP

Overview

PHP Stomp client that supports various connection methods and mechanisms for transforming messages to suitable formats. Check documentation for complete feature list.

Download

Download the current release from http://code.google.com/p/stompcli/downloads/list

Quick Start

After you download the archive, extract it to your include_path. Once you've done that, you can use the client as follows

// include a library
require_once("stomp/Stomp.php");
// make a connection
$con = new StompConnection("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
$this->assertEquals($msg->body, "test");

// disconnect
$con->disconnect();

Developers

Source

Use this command to anonymously check out the latest project source code:

svn checkout http://stompcli.googlecode.com/svn/trunk/ stompcli-read-on ly

Unit Testing

Instructions on how to set up a unit testing environment could be found here

Powered by Atlassian Confluence