<?php namespace Jobs\Model\Queue; interface MTopicQueueInterface { public static function getConnection(array $config, $logger); /** * @return array a array of topics */ public function getTopics(); /** * @param array $topics */ public function setTopics(array $topics); /** * 推送队列,返回jobid字符串. * * @param [type] $topic * @param JobObject $job * * @return string */ public function push($topic, $job); /** * 从队列拿消息. * * @param [type] $topic * * @return array */ public function pop($topic); /** * @param $topic * * @return int */ public function len($topic); public function close(); public function isConnected(); }