server/redis-clients.js
function onmessage(channel, message) {
  if(closing) {
    return;
  }

  switch(channel) {
    case ChannelConstants.syncChannel:
      module.exports.emit('sync', message);
      break;
    case ChannelConstants.lockRequestChannel:
      module.exports.emit('lock-request', message);
      break;
    case ChannelConstants.lockResponseChannel:
      module.exports.emit('lock-response', message);
      break;
    default:
      log.warn('[Redis] Got unexpected message on channel `%s`. Message was: `%s`', channel, message);
      break;
  }
}
function onmessage(channel, message) {
  if(closing) {
    return;
  }

  switch(channel) {
    case ChannelConstants.syncChannel:
      module.exports.emit('sync', message);
      break;
    case ChannelConstants.lockRequestChannel:
      module.exports.emit('lock-request', message);
      break;
    case ChannelConstants.lockResponseChannel:
      module.exports.emit('lock-response', message);
      break;
    default:
      log.warn('[Redis] Got unexpected message on channel `%s`. Message was: `%s`', channel, message);
      break;
  }
}
function onmessage ( channel , message ) { if ( closing ) { return ; } switch ( channel ) { case ChannelConstants . syncChannel : module . exports . emit ( 'sync' , message ) ; break ; case ChannelConstants . lockRequestChannel : module . exports . emit ( 'lock-request' , message ) ; break ; case ChannelConstants . lockResponseChannel : module . exports . emit ( 'lock-response' , message ) ; break ; default : log . warn ( '[Redis] Got unexpected message on channel `%s`. Message was: `%s`' , channel , message ) ; break ; } }
redis subscription messages. Split the different types out based on channel
redis subscription messages . Split the different types out based on channel