Skip to content

Publish function sometimes retain false, sometimes true #50

@mantua75

Description

@mantua75

Hi everybody, I'm using this great plugin and I create a function to send message.

function mqttSend(thisTopic,thisPayload,callback){

cordova.plugins.CordovaMqTTPlugin.publish({
   topic:thisTopic,
   payload:thisPayload,
   qos:0,
   retain:false,
   success:function(s){	   	
   	console.log("Mqtt send OK");
   	if(callback!==undefined){
   		callback(1);
   	}
   },
   error:function(e){
   	console.log("Mqtt send error");
   	console.log(e);
   	callback(-1);
   }
})

}

If I check the logs on the server that receives the messages it tells me some sendings are with retain false and others with retail true but the function is always the same.

Has anyone encountered the same problem?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions