Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Hi Paho team.

Hi Paho team,


I am not sure if it counts as a bug in mqtt Java client implementation that is when I publish the topic and calling waitforcompletion(), If this topic was published from messageArrived call back method. I will never get the completeDelivery call back again. And it seems  got block unless the published message I sent in the messageArrived() call back was un other thread.


For example:
public void send(Topic topic){
token = topic.publish();
token.waitforcompletion();
}



public void completeDelivery(Token){
printout(token.getmessageID());
}



public void messageArrived(message){
….have received message

..now send back reply.
send("reply"); …This reply message will be blocked and never call "completeDelivery". 
Thread thread = new thread();

thread.start
{
send("reply"); If reply sending in other thread, then worked.
}

}


Thanks. 


Regards,
 
Jianing Ren







This email has been processed by SmoothZap - www.smoothwall.net


Back to the top