• rabbitmq 相关方法


    //连接
    $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()]);




  • 相关阅读:
    WP7备注(13)(独立储存)
    WP7备注(14)(ContentPropertyAttribute)
    WP7备注(11)(页面跳转)
    WP7备注(10)(Accelerometer+GeoCoordinateWatcher+Map Service)
    WP7备注(12)(页面数据共享)
    WP7备注(18)(OpacityMask)
    WP7备注(15)(Resources)
    WP7备注(19)(ImageBrush|VideoBrush)
    WP7备注(17)(TextBlock和Inlines)
    vmware 复制其他电脑的linux无法上网问题
  • 原文地址:https://www.cnblogs.com/grimm/p/5729571.html
Copyright © 2020-2023  润新知