Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] sending a message from subscribe callback

Hi Robert,

from what I know it is allowed, but if you don't use the asynchronous client, it will create a deadlock.

The callback blocks when executing one of its methods. A publish only finishes when its delivery token arrives.
Because you are sending in the messageArrived method, the callback is still in use and the token can't be received.

I had this problem implementing a request - reply feature. The asynchronous client solved this problem.

Regards,

Michael

2016-01-13 0:23 GMT+01:00 robert <rschwarz0@xxxxxxxxx>:
Hi,
I am not exactly clear on the threading model.
Is it allowed to send a message from within a subscribe call back ?
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev


Back to the top