the1laz / cgateweb

MQTT interface for C-Bus written in Node.js
MIT License
21 stars 20 forks source link

Thousands of queued messages #16

Closed mminehanNZ closed 4 years ago

mminehanNZ commented 5 years ago

I have cgate, cgateweb and mosquitto all installed on a Pi. This all talks to HomeSeer via mcsMQTT. Working well. But if mosquitto is stopped for a while all the cgate (cgateweb) messages seemed to get queued somewhere. Restarting mosquitto resulted in over 32,000 messages having to be processed by HomeSeer. I'm very new to linux and GitHub etc. So excuse me if this is the wrong place for this kind of question. Where are the queued messages stored? Is there away to stop messages from queuing if mosquitto is not running? Thanks.

the1laz commented 5 years ago

Hmm, not too sure, I can't see anywhere I the script that piles up messages that might hoard them if the connection goes down. Have you got retainreads set in the settings file? It could also be the mqtt client does it automatically, I'll have to check.

mminehanNZ commented 5 years ago

Hi, I think I found the issue. The messages were set to retain and were being stored in the Mosquito database. Once I deleted the database and changed the retain status the problem seems to have gone....I hope.

the1laz commented 5 years ago

@mminehanNZ thanks for the heads up. Was it set in the cgateweb settings?

mminehanNZ commented 4 years ago

Sorry I didn't get back to this sooner. To be honest it was a while ago and it has slipped my memory. But I do not have retain set in settings.js or on the broker. This is fine for my setup and my HA system (HomeSeer) handles power failures etc. I will close the issue. Thanks for all your work.