KxSystems / mqtt

MQTT messaging protocol interface
https://code.kx.com/q/interfaces
Apache License 2.0
9 stars 12 forks source link

Check example subscriber setup #57

Closed sshanks-kx closed 1 year ago

sshanks-kx commented 1 year ago

Looks like a message could potentially arrive before the subscription table created (could be altered to setup prior to the event) https://github.com/KxSystems/mqtt/blob/master/examples/consumer.q

sshanks-kx commented 1 year ago

Should be ok. Even though an mqtt thread could get the sub data prior to the table/callback setup, the kdb thread wont be free to read it til the end of the script (by which the callback will be setup). Will prob change anyway to be a better practise to have everything setup prior to sub.