• 0

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /var/www/html/cnasolution/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/index.php
Line: 315
Function: require_once

I have the below code. How can I get the response sent back to me from the server, so I can process it?

I assume I am meant to get the response where I placed the 'TODO'.

public void subscribe(Mqtt3AsyncClient client, String topic, byte qos) {         client.subscribeWith()                 .topicFilter(topic)                 .callback(publish -> {                      // TODO process the message                  })                 .send()                 .whenComplete((subAck, throwable) -> {                     if (throwable != null) {                         Log.d(CLASS_NAME, "Subscription failed..");                     } else {                         Log.d(CLASS_NAME, "Subscription successful!");                      }                 });     } 
Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]