2008-05-21

STOMP Delete Queue on ActiveMQ Server

PHP Code :

require_once("Stomp.php");

// make a connection
$con = new StompConnection("tcp://localhost:61613");

// connect
$con->connect();

// subscribe to the queue
$con->subscribe("/queue/test");

// receive a message from the queue
$msg = $con->readFrame();

// Print Result
print_r( $msg );

// Delete queue
$con->ack($msg->headers['message-id']);

// disconnect
$con->disconnect();