var server = require('http').createServer(app);
var ascoltatore = {
type: 'mongo',
url: 'mongodb://localhost:27017/mqtt',
pubsubCollection: 'ascoltatori',
mongo: {}
};
//mosca settings for packets persistence
var settings = {
port: 1883,
backend: ascoltatore,
persistence: {
factory: mosca.persistence.Mongo,
url: 'mongodb://localhost:27017/mqtt'
}
};
var broker = new mosca.Server(settings);
broker.attachHttpServer(server); //attach to a server for MQTT over WEBSOCKETS
I need to handle QoS 1 messages so each client has the cleanSession flag set to false and a fixed clientId. If I restart the server all clients reconnect but the broker doesn't 'remember' old subscriptions so they don't receive any packet. Is this a bug or have I missed something in my broker configuration?
My mqtt database has 4 collections:
ascoltatori
packetsalways empty
retainedalways empty
subscriptionsalways empty
ascoltatori keeps track of every subscribption/unsubscription, client connected/disconnected, packets published of every QoS and gets everyday bigger is there a way to limit it's size or the only limit is system storage size?
I start Mosca with this configuration:
I need to handle QoS 1 messages so each client has the
cleanSession
flag set tofalse
and a fixedclientId
. If I restart the server all clients reconnect but the broker doesn't 'remember' old subscriptions so they don't receive any packet. Is this a bug or have I missed something in my broker configuration?My
mqtt
database has 4 collections:ascoltatori
packets
always emptyretained
always emptysubscriptions
always emptyascoltatori
keeps track of every subscribption/unsubscription, client connected/disconnected, packets published of every QoS and gets everyday bigger is there a way to limit it's size or the only limit is system storage size?