getConnection(); for($i = 0; $i < 10; $i++) { $con->send('NonXAin', 'ABC'); } unset($con); echo "Send in : 10\r\n"; } private function checkQueue($lbl, $con, $q) { $con->subscribe($q); $n = 0; while(($frame = $con->readFrame()) != null) { $con->ack($frame); $n++; } $con->unsubscribe($q); echo "$lbl : $n\r\n"; } public function check() { $con = $this->getConnection(); $this->checkQueue('Recv out', $con, 'NonXAout'); $this->checkQueue('Left in ', $con, 'NonXAin'); unset($con); } public abstract function getConnection(); public abstract function test(); public static function demo($mq) { $mq->setup(); $mq->test(); $mq->check(); } } ?>