subscribeAndWaitForMessage is not working as expected.
If it's used in a loop to get multiple messages it doesn't unsubscribe and if a previously subscribed message arrives from a different topic before the actual topic used in subscribeAndWaitForMessage it assume this one to be the correct one and returns a wrong result.
I fixed it by adding a
unset($this->topics[$topic]);
before the return in subscribeAndWaitForMessage
Hi,
subscribeAndWaitForMessage is not working as expected.
If it's used in a loop to get multiple messages it doesn't unsubscribe and if a previously subscribed message arrives from a different topic before the actual topic used in subscribeAndWaitForMessage it assume this one to be the correct one and returns a wrong result.
I fixed it by adding a unset($this->topics[$topic]); before the return in subscribeAndWaitForMessage