在某些情況下(例如 ActiveMQ),當您有很多消費者時,您需要在連線過程中識別您的「client-id」,否則伺服器可能會誤解您的連線並建立新的主題/佇列。
<?php
$stomp = new Stomp($url, $user, $password, array('client-id'=> $clientId ));
?>
(PECL stomp >= 0.1.0)
表示 PHP 與相容 Stomp 的訊息代理程式之間的連線。
$broker
= ini_get("stomp.default_broker_uri"),$username
= ?,$password
= ?,$headers
= ?$link
, 字串(string) $transaction_id
, 陣列(array) $headers
= ?): 布林值(bool)$link
, 混合型別(mixed) $msg
, 陣列(array) $headers
= ?): 布林值(bool)$link
, 字串(string) $transaction_id
, 陣列(array) $headers
= ?): 布林值(bool)$link
, 字串(string) $transaction_id
, 陣列(array) $headers
= ?): 布林值(bool)$broker
= ini_get("stomp.default_broker_uri"),$username
= ?,$password
= ?,$headers
= ?$link
): 布林值(bool)在某些情況下(例如 ActiveMQ),當您有很多消費者時,您需要在連線過程中識別您的「client-id」,否則伺服器可能會誤解您的連線並建立新的主題/佇列。
<?php
$stomp = new Stomp($url, $user, $password, array('client-id'=> $clientId ));
?>