You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to connect, It always shows the exemption message "Unable to connect broker". I am not sure is it an issues with logins or port?
require __DIR__ . '/../vendor/autoload.php';
use Stomp\Client;
use Stomp\Network\Connection;
use Stomp\StatefulStomp;
use Stomp\Transport\Message;
use Stomp\Exception\ConnectionException;
use Stomp\Network\Observer\HeartbeatEmitter;
use Stomp\Transport\Frame;
use Stomp\Exception\StompException;
use Stomp\Stomp;
$brokerUri = '....';
$connection = new Connection($brokerUri);
$client = new Client($connection);
$client->setLogin($username, $pass);
// connect
try {
$client->connect();
} catch (ConnectionException $e) {
echo "Connections ERROR: \n". PHP_EOL;
echo $e->getMessage() . PHP_EOL;;
}
Is there anything I am missing?
The text was updated successfully, but these errors were encountered:
I don't see anything immediately. You could try passing the brokerUrl directly to the Client constructor and avoid creating your own Connection, but that shouldn't really be a problem. I'd try to get this working with a local ActiveMQ broker and once that is working you can try Amazon again.
I am using ActiveMQ on AmazonMQ as a broker.
When I try to connect, It always shows the exemption message "Unable to connect broker". I am not sure is it an issues with logins or port?
Is there anything I am missing?
The text was updated successfully, but these errors were encountered: