更多>
最新下载
24小时阅读排行榜
- 1 mysql MyISAM存储引擎有什么特点_mysql引擎区别说明
- 2 如何使用select查询数据_mysql基本查询示例
- 3 MAUI怎么实现一个计时器功能 MAUI Timer使用方法
- 4 css工具如何实现动态样式_通过变量和函数动态生成样式
- 5 C# 反射调用方法方法 C#如何使用MethodInfo.Invoke动态调用方法
- 6 php代码示例如何调用api接口_php调用api接口代码示例【示例】
- 7 css如何在响应式布局中保持列间距一致_使用gap或margin控制
- 8 Go语言interface传值还是传指针_Golang接口底层行为解析
- 9 php读取rtf文件能提取文本吗_php读取rtf纯文本提取法【步骤】
- 10 css如何实现多层定位元素_利用嵌套容器和position组合
- 11 mysql升级后的字符集与时区设置问题处理
- 12 css 伪元素 before 和 after 有什么用_用于插入装饰性内容
- 13 C# WebApplicationFactory测试方法 C#如何为ASP.NET Core进行集成测试
- 14 css 伪元素与图标显示_通过 ::before 和 ::after 添加字体图标
- 15 Golang如何在命令行程序中处理错误_Golang CLI错误输出方法
更多>
最新教程
-
- Node.js 教程
- 16531 2025-08-28
-
- CSS3 教程
- 1547471 2025-08-27
-
- Rust 教程
- 23620 2025-08-27
-
- Vue 教程
- 26006 2025-08-22
-
- PostgreSQL 教程
- 22514 2025-08-21
-
- Git 教程
- 9406 2025-08-21
下载首页 / 类库下载 / 其它类库
AMQP,即Advanced Message Queuing Protocol,一个提供统一消息服务的应用层标准高级消息队列协议,是应用层协议的一个开放标准,为面向消息的中间件设计。基于此协议的客户端与消息中间件可传递消息,并不受客户端/中间件不同产品,不同的开发语言等条件的限制。Erlang中的实现有 RabbitMQ等。
abstract class AbstractChannel
{
const PROTOCOL_080 = '0.8';
const PROTOCOL_091 = '0.9.1';
public static $PROTOCOL_CONSTANTS_CLASS;
public function __construct(AbstractConnection $connection, $channel_id)
{
$this->connection = $connection;
$this->channel_id = $channel_id;
$connection->channels[$channel_id] = $this;
$this->frame_queue = array(); // Lower level queue for frames
$this->method_queue = array(); // Higher level queue for methods
$this->auto_decode = false;
$this->msg_property_reader = new AMQPReader(null);
$this->wait_content_reader = new AMQPReader(null);
$this->dispatch_reader = new AMQPReader(null);
$this->protocolVersion = self::getProtocolVersion();
switch ($this->protocolVersion) {
case self::PROTOCOL_091:
self::$PROTOCOL_CONSTANTS_CLASS = 'PhpAmqpLib\Wire\Constants091';
$c = self::$PROTOCOL_CONSTANTS_CLASS;
$this->debug = new DebugHelper($c);
$this->amqp_protocol_header = $c::$AMQP_PROTOCOL_HEADER;
$this->protocolWriter = new Protocol091();
$this->waitHelper = new Wait091();
$this->methodMap = new MethodMap091();
break;
case self::PROTOCOL_080:
self::$PROTOCOL_CONSTANTS_CLASS = 'PhpAmqpLib\Wire\Constants080';
$c = self::$PROTOCOL_CONSTANTS_CLASS;
$this->debug = new DebugHelper($c);
$this->amqp_protocol_header = $c::$AMQP_PROTOCOL_HEADER;
$this->protocolWriter = new Protocol080();
$this->waitHelper = new Wait080();
$this->methodMap = new MethodMap080();
break;
default:
throw new AMQPRuntimeException(sprintf(
'Protocol: %s not implemented.',
$this->protocolVersion
));
}
}
本站所有资源都是由网友投搞发布,或转载各大下载站,请自行检测软件的完整性!本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!如有侵权请联系我们删除下架,联系方式:admin@php.cn
