Closed TangMonk closed 7 years ago
In embedded cannot work, this following is the code:
const pubsubsettings = { type: 'redis', db: 12, port: 6379, return_buffers: true, host: "localhost", redis: require('ioredis') }; const moscaSettings = { port: 1883, backend: pubsubsettings }; const server = new mosca.Server(moscaSettings);
But works in standalone mode mosca -v | pino
mosca -v | pino
You need to set a persistence as well: https://github.com/mcollina/mosca/blob/master/test/server_redis.js#L33-L35
In embedded cannot work, this following is the code:
But works in standalone mode
mosca -v | pino