lib/eventDispatcher.js
function process (event, nxt) {

      // Publish it now...
      debug('publish event...');
      dispatcher.publisher(event.payload, function(err) {
        if (err) {
          return debug(err);
        }
        // ...and set the published event to dispatched.
        debug('set event to dispatched...');
        dispatcher.store.setEventToDispatched(event, function(err) {
          if (err) {
            debug(err);
          } else {
            debug('event set to dispatched');
          }
        });
      });

      nxt();
    }
function process (event, nxt) {

      // Publish it now...
      debug('publish event...');
      dispatcher.publisher(event.payload, function(err) {
        if (err) {
          return debug(err);
        }
        // ...and set the published event to dispatched.
        debug('set event to dispatched...');
        dispatcher.store.setEventToDispatched(event, function(err) {
          if (err) {
            debug(err);
          } else {
            debug('event set to dispatched');
          }
        });
      });

      nxt();
    }
function process ( event , nxt ) { // Publish it now... debug ( 'publish event...' ) ; dispatcher . publisher ( event . payload , function ( err ) { if ( err ) { return debug ( err ) ; } // ...and set the published event to dispatched. debug ( 'set event to dispatched...' ) ; dispatcher . store . setEventToDispatched ( event , function ( err ) { if ( err ) { debug ( err ) ; } else { debug ( 'event set to dispatched' ) ; } } ) ; } ) ; nxt ( ) ; }
dipatch one event in queue and call the _next_ callback, which will call _process_ for the next undispatched event in queue.
dipatch one event in queue and call the _next_ callback which will call _process_ for the next undispatched event in queue .