//连接
$conn_args = array( 'host'=>'127.0.0.1' , 'port'=> '5672', 'login'=>'guest' , 'password'=> 'guest');
$conn = new AMQPConnection($conn_args);
//通道方法
$channel = new AMQPChannel($conn);
$channel->basicRecover(requeue:bool=true);
$channel->commitTransaction();
$channel->getPrefetchCount();
$channel->getChannelId();
$channel->getConnection();
$channel->getPrefetchSize();
$channel->isConnected();
$channel->qos(size:int,count:int);
$channel->rollbackTransaction();
$channel->setPrefetchCount(count:int);
$channel->setPrefetchSize(size:int);
$channel->startTransaction();
//交换机方法
$ex = new AMQPExchange($channel);
$ex->bind(exchange_name:string,[route_key:string=''],[arguments:array=array()]);
$ex->declareExchange();//1.2.0 后由declare()改为declareExchange();
$ex->delete([exchangeName=null],[flags:int=AMQP_NOPARAM]);
$ex->getArgument(key:string);
$ex->getArguments();
$ex->getChannel();
$ex->getConnection();
$ex->getFlags();
$ex->getName();
$ex->getType();
$ex->publish(message:string,[flags:int=AMQP_NOPARAM],[attributes:array=array()]);
$ex->setArgument(key:strig,value:int|string);
$ex->setArguments(arguments:array);
$ex->setName(exchange_name:string);
$ex->setFlags(flags:int);
$ex->unbind(exchange_name:string,[route_key:string=''],[arguments:array=array()]);
//队列方法
$q = new AMQPQueue($channel);
$q->ack(delivery_tag:string,[flags:int=AMQP_NOPARAM]);
$q->bind();
$q->cancel(consumer_tag:string='');
$q->consume([callback:callable|null=null],[flags:int=AMQP_NOPARAM],[consumerTag=null]);
$q->declareQueue();
$q->delete([flags:int=AMQP_NOPARAM]);
$q->get([flags:int=AMQP_NOPARAM]);
$q->getArgument(key:string);
$q->getArguments();
$q->getChannel();
$q->getConnection();
$q->getFlags();
$q->getName();
$q->nack(delivery_tag:string,[flags:int=AMQP_NOPARAM]);
$q->purge();
$q->reject(delivery_tag:string,[flags:int=AMQP_NOPARAM]);
$q->setArgument(key:string,vaule);
$q->setArguments(arguments:array);
$q->setFlags(flags:int);
$q->setName(queue_name:string);
$q->unbind(exchange_name:string,[route_key:string=''],[arguments:array=array()]);