diff --git a/src/FuseSource/Stomp/Stomp.php b/src/FuseSource/Stomp/Stomp.php index 29491e7..90fa2a5 100755 --- a/src/FuseSource/Stomp/Stomp.php +++ b/src/FuseSource/Stomp/Stomp.php @@ -187,10 +187,11 @@ protected function _makeConnection () * * @param string $username * @param string $password + * @param string $clientId * @return boolean * @throws StompException */ - public function connect ($username = '', $password = '') + public function connect ($username = '', $password = '', $clientId = null) { $this->_makeConnection(); if ($username != '') { @@ -199,6 +200,10 @@ public function connect ($username = '', $password = '') if ($password != '') { $this->_password = $password; } + if(!\is_null($clientId)) ++ { ++ $this->clientId = $clientId; ++ } $headers = array('login' => $this->_username , 'passcode' => $this->_password); if ($this->clientId != null) { $headers["client-id"] = $this->clientId;