title: MQTT embedded mosca without any broker
body: <p>I would like to use node.js mosca MQTT broker in an embedded way.</p>
  
  <p>From the documentation, it seems that embedded mosca has to use an external broker such as Mosquitto, AMQP, ZeroMQ, Redis. In the case of stand-alone mosca, no external broker is required. Can an embedded mosca be run such that no external broker is used similar to stand-alone mosca?</p>
  
  <p>If this can be done, how should the code that uses redis below be modified?</p>
  
  <pre><code>var mosca = require('mosca')
  
  var ascoltatore = {
    type: 'redis',
    redis: require('redis'),
    db: 12,
    port: 6379,
    return_buffers: true, // to handle binary payloads
    host: "localhost"
  };
  
  var moscaSettings = {
    port: 1883,
    backend: ascoltatore,
    persistence: {
      factory: mosca.persistence.Redis
    }
  };
  
  var server = new mosca.Server(moscaSettings);
  server.on('ready', setup);
  
  server.on('clientConnected', function(client) {
      console.log('client connected', client.id);     
  });
  
  // fired when a message is received
  server.on('published', function(packet, client) {
    console.log('Published', packet.payload);
  });
  
  // fired when the mqtt server is ready
  function setup() {
    console.log('Mosca server is up and running')
  }
  </code></pre>