Le mercredi 28 février 2018 à 12:42:20 UTC+1, Laurent FAILLIE <[email protected]> a écrit :
Hum, what a can see from cqueue is it requieres Lua 5.2 isn't it ?
My systems are still under 5.1
Le mercredi 28 février 2018 à 07:02:07 UTC+1, Russell Haley <[email protected]> a écrit :
On Tue, Feb 27, 2018 at 7:09 PM, Daurnimator <[email protected]> wrote:
> On 28 February 2018 at 11:20, Laurent FAILLIE <[email protected]> wrote: >> Hello, >> >> I'm writting a bridge from incoming MQTT messages (using paho.mqtt library) >> to Postgresql database insertion using pgmoon. >> >> As this tool will be only even driven and as all the processing will be done >> in the MQTT callback, my tool will have nothing to do in its main loop. >> >> Which is the best way the handle this infinite "do nothing" ? The target >> system is Linux so I can obviously use POSIX stuffs. >> >> Thanks >> >> Laurent > > I did a thing similar recently as a demo. > > I used cqueues + https://github.com/flukso/lua-mosquitto > You could use https://github.com/daurnimator/cqueues-pgsql to do the > writing to postgres.
> +1 for cqueues and anything that uses it. Brilliant stuff that.