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
Hello , i am facing an issue for concurrent user. I am not able to send data to broker if one publisher is already connected.
here is my configuration
import init from 'react_native_mqtt';
import AsyncStorage from '@react-native-async-storage/async-storage';
import DeviceInfo from 'react-native-device-info';
Hello , i am facing an issue for concurrent user. I am not able to send data to broker if one publisher is already connected.
here is my configuration
import init from 'react_native_mqtt';
import AsyncStorage from '@react-native-async-storage/async-storage';
import DeviceInfo from 'react-native-device-info';
init({
size: 10000,
storageBackend: AsyncStorage,
defaultExpires: 1000 * 3600 * 24,
enableCache: true,
sync: {},
});
const defaultConnectOptions = {
reconnect: false,
cleanSession: true,
mqttVersion: 3,
keepAliveInterval: 60,
timeout: 60
}
class MQTTConnection {
constructor(host, port, clientID) {
this.mqtt = new Paho.MQTT.Client(host, port, clientID);
this.QOS = 1;
this.RETAIN = true;
this.channel = 'test';
this.clientID = "device";
//this.clientID = 'new_mqtt_test'
}
}
// let client = null
// if (!client){
// client = new MQTTConnection('13.233.185.239', 8083,'ClientId');
// // client = new MQTTConnection('13.233.185.239', 8083,'ClientId');
// client.connect()
// }
//const client= new MQTTConnection('13.233.185.239', 8083,'ClientId');
export default MQTTConnection;
MQTTConnection.prototype.onMQTTConnect = ()=>{console.log('debug connect....')}
MQTTConnection.prototype.onMQTTLost = ()=>{console.log('debug lost...')}
MQTTConnection.prototype.onMQTTMessageArrived = ()=>{console.log('debug arrived...')}
MQTTConnection.prototype.onMQTTMessageDelivered = ()=>{console.log('debug delivered...')}
The text was updated successfully, but these errors were encountered: