1234567891011121314151617181920212223 |
- <?php
- namespace components;
- use PhpAmqpLib\Message\AMQPMessage;
- use PhpAmqpLib\Connection\AMQPStreamConnection;
- class RabbitMqBase {
- public function __construct(){
- include_once('RabbitMqServer.php');
- }
- public static function setRabbitMq($message,$k_route = 'operate-log',$e_name=''){
- $rabbitObj = new RabbitMqServer();
- $rabbitObj->setRabbit($message,$k_route,$e_name);//设置列队
- }
- public static function getRabbitMq($k_route = 'operate-log',$e_name='' ){
- $rabbitObj = new RabbitMqServer();
- $getRabObj = $rabbitObj->getRabbit($k_route,$e_name);//获取列队
- return $getRabObj;
- }
- }
|