When we make a query, the "server" (Python) program subscribes to the response topic which would contain the answer.
When the response topic is published, the answer is transmitted, and the response topic name is deleted from the list of topics from which a response is expected.
If the responding MQTT device is not connected, and a query is made, the response will not be transmitted. (There won't have BEEN a response.) When the device comes online again, and transmits a response (or is queried such that the response topic is published), then the response will be broadcast, even though the request might have been made some long time previous.
Suggest: if the response topic is not forthcoming within (nominally) 60 seconds, a message to this effect should be broadcast. The expected response topic should be deleted from the list of response topics.
When we make a query, the "server" (Python) program subscribes to the response topic which would contain the answer. When the response topic is published, the answer is transmitted, and the response topic name is deleted from the list of topics from which a response is expected. If the responding MQTT device is not connected, and a query is made, the response will not be transmitted. (There won't have BEEN a response.) When the device comes online again, and transmits a response (or is queried such that the response topic is published), then the response will be broadcast, even though the request might have been made some long time previous.
Suggest: if the response topic is not forthcoming within (nominally) 60 seconds, a message to this effect should be broadcast. The expected response topic should be deleted from the list of response topics.