AMQP,即Advanced Message Queuing Protocol,一個提供統(tǒng)一訊息服務(wù)的應(yīng)用層標(biāo)準(zhǔn)高級訊息佇列協(xié)定,是應(yīng)用層協(xié)定的一個開放標(biāo)準(zhǔn),為面向訊息的中間件設(shè)計?;洞藚f(xié)定的用戶端與訊息中間件可傳遞訊息,且不受客戶端/中介軟體不同產(chǎn)品,不同的開發(fā)語言等條件的限制。 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 )); } }
本站所有資源皆由網(wǎng)友貢獻(xiàn)或各大下載網(wǎng)站轉(zhuǎn)載。請自行檢查軟體的完整性!本站所有資源僅供學(xué)習(xí)參考。請不要將它們用於商業(yè)目的。否則,一切後果都由您負(fù)責(zé)!如有侵權(quán),請聯(lián)絡(luò)我們刪除。聯(lián)絡(luò)方式:admin@php.cn
相關(guān)文章

17 Feb 2025
WordPress 深度依賴第三方 JavaScript 和 PHP 庫,其中 jQuery 是使用最廣泛的 JavaScript 庫,PHP 庫主要由單個類文件組成。其他使用的 JavaScript 庫包括 jQuery Masonry、jQuery Hotkeys、jQuery Suggest、jQuery Form、jQuery Color、jQuery Migrate、jQuery Schedule、jQuery UI、Backbone、colorpicker、hoverIntent、S

24 Dec 2024
了解 Python 類別繼承在 Python 中,類別可以從其他類別繼承,這使它們能夠存取父類別的屬性並...

05 Dec 2024
在 Linux 上建立和使用動態(tài)共用 C 類別庫建立共用類別庫要建立共用 C 類別庫,您可以依照...


熱門工具標(biāo)籤

熱工具

依賴注入容器的PHP庫
依賴注入容器的PHP庫

50個優(yōu)秀經(jīng)典PHP演算法大集合
經(jīng)典PHP演算法,學(xué)習(xí)優(yōu)秀的想法 , 開拓思維

小巧的最佳化圖片的PHP庫
小巧的最佳化圖片的PHP庫
