I Download ActiveMQ Broker v5.11.1 And Run It (Use MQTT). I Can Publish And Subscribe With Websocket & PHP For Publish And Broker Work Well.
But When Use PHP for subscribe Broker Console Give Me This ERROR And Dont Subscribe Topic WARN : Transport Connection to :tcp://127.0.0.1:18967 failed:java.io.IOExeption:Unexpected error occurred:java.lang.ArrayIndexOutOfBoundsException :12 <http://activemq.2283324.n4.nabble.com/file/n4698367/activemq.jpg> This Error In A loop That Port Error(tcp://127.0.0.1:18967) In Each Period Is Changed Subscribe.php : <?php require("../phpMQTT.php"); $mqtt = new phpMQTT("localhost", 1883, "phpMQTT Sub Example"); //Change client name to something unique if(!$mqtt->connect()){ exit(1); } $topics['chat/general'] = array("qos"=>0, "function"=>"procmsg"); $mqtt->subscribe($topics,0); while($mqtt->proc()){ } $mqtt->close(); function procmsg($topic,$msg){ echo "Msg Recieved: ".date("r")."\nTopic:{$topic}\n$msg\n"; } ?> -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-MQTT-crash-when-subscribe-tp4698367.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.