0

Undefined array key "qos"

My code

use Salman\Mqtt\MqttClass\Mqtt;

public function SubscribetoTopic()
{
    $mqtt = new Mqtt();
    $client_id = '123';
    $topic ='testdata1';
    $mqtt->ConnectAndSubscribe($topic, function($topic, $msg){
        echo "Msg Received: \n";
        echo "Topic: {$topic}\n\n";
        echo "\t$msg\n\n";
    }, $client_id);
}

I am using the package - salmanzafar/laravel-mqtt

composer require salmanzafar/laravel-mqtt

and I have inserted the above code in controller and getting error in MqttService vendor/salmanzafar/ laravel-mqtt / src/ MqttClass/MqttService.php: 273

I am using, Laravel : 10.3.2 php : 8.1 package "salmanzafar/laravel-mqtt": "^2.0"

hardillb
  • 54,545
  • 11
  • 67
  • 105
  • There is an open issue for this against the project https://github.com/salmanzafar949/MQTT-Laravel/issues/46 – hardillb Mar 10 '23 at 14:18

0 Answers0