{"action":"created","issue":{"url":"https://api.github.com/repos/tuanpmt/esp_mqtt/issues/27","labels_url":"https://api.github.com/repos/tuanpmt/esp_mqtt/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/tuanpmt/esp_mqtt/issues/27/comments","events_url":"https://api.github.com/repos/tuanpmt/esp_mqtt/issues/27/events","html_url":"https://github.com/tuanpmt/esp_mqtt/issues/27","id":54649154,"number":27,"title":"Does not process data from second subscription immediately after connect","user":{"login":"jcwoltz","id":272626,"avatar_url":"https://avatars.githubusercontent.com/u/272626?v=3","gravatar_id":"","url":"https://api.github.com/users/jcwoltz","html_url":"https://github.com/jcwoltz","followers_url":"https://api.github.com/users/jcwoltz/followers","following_url":"https://api.github.com/users/jcwoltz/following{/other_user}","gists_url":"https://api.github.com/users/jcwoltz/gists{/gist_id}","starred_url":"https://api.github.com/users/jcwoltz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcwoltz/subscriptions","organizations_url":"https://api.github.com/users/jcwoltz/orgs","repos_url":"https://api.github.com/users/jcwoltz/repos","events_url":"https://api.github.com/users/jcwoltz/events{/privacy}","received_events_url":"https://api.github.com/users/jcwoltz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-17T03:33:42Z","updated_at":"2015-01-17T14:33:04Z","closed_at":null,"body":"Hello,\r\n\r\nWhen I subscribe to two topics, as in the initial example, during the mqttConnectedCb the data is not processed from the second subscription in the mqttDataCb. If I send data later, it does work. However, on boot and reconnect, it is not getting this second message. \r\n\r\nSimilarly, If I subscribe to a wildcard, I do not get the topics passed to the mqttDataCb during the connected stage. It only gets the first message. \r\n\r\nI do not know if something else needs added to a queue to get this to work. The reason it is important to get the data from the 2 subscriptions is to restore the state on bootup or reconnect. In this test, I subscribe to two topics:\r\nsensor/node1/control/led1\r\nsensor/node1/control/led2\r\n\r\nBelow is the relevant output from this test. Thank you for your work. \r\n\r\nMQTT: Starting subscription\r\nMQTT: subscribe, topic\"sensor/node1/control/led1\" at broker 104.200.29.35:1883\r\nMQTT: subscribe, topic\"sensor/node1/control/led2\" at broker 104.200.29.35:1883\r\nMQTT: queuing publish, length: 24...\r\nMQTT: Sending..\r\nTCP: Sent\r\nMQTT: Published\r\nTCP: data received\r\nMQTT: Sending..\r\nTCP: Sent\r\nMQTT: Published\r\nTCP: data received\r\nMQTT topic: sensor/node1/control/led1, data: on\r\nLED1 sub\r\nLED1 sub data high\r\nMQTT: Sending..\r\nTCP: Sent\r\nMQTT: Published\r\nTCP: data received\r\n"},"comment":{"url":"https://api.github.com/repos/tuanpmt/esp_mqtt/issues/comments/70369057","html_url":"https://github.com/tuanpmt/esp_mqtt/issues/27#issuecomment-70369057","issue_url":"https://api.github.com/repos/tuanpmt/esp_mqtt/issues/27","id":70369057,"user":{"login":"jcwoltz","id":272626,"avatar_url":"https://avatars.githubusercontent.com/u/272626?v=3","gravatar_id":"","url":"https://api.github.com/users/jcwoltz","html_url":"https://github.com/jcwoltz","followers_url":"https://api.github.com/users/jcwoltz/followers","following_url":"https://api.github.com/users/jcwoltz/following{/other_user}","gists_url":"https://api.github.com/users/jcwoltz/gists{/gist_id}","starred_url":"https://api.github.com/users/jcwoltz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcwoltz/subscriptions","organizations_url":"https://api.github.com/users/jcwoltz/orgs","repos_url":"https://api.github.com/users/jcwoltz/repos","events_url":"https://api.github.com/users/jcwoltz/events{/privacy}","received_events_url":"https://api.github.com/users/jcwoltz/received_events","type":"User","site_admin":false},"created_at":"2015-01-17T14:33:04Z","updated_at":"2015-01-17T14:33:04Z","body":"ok, thank you."}}