 
   requireSession:(clientId, routingKey, callback)->
     {JSession} = @bongo.models
-    JSession.fetchSession clientId, (err, session)->
+    JSession.fetchSession clientId, (err, session)=>
       if err? or not session? then @rejectClient routingKey
       else
         tokenHasChanged = session.clientId isnt clientId


  joinKiteClient:(messageData, routingKey, socketId)->
    {channel} = messageData
    @authenticate messageData, routingKey, (session)->
      @bongo.mq.connection.exchange @getNextServiceName(channel), (exchange)->
        exchange.publish 'auth.join', {
          username    : session.username
          routingKey  : routingKey


  joinClient:(data, socketId)->
    {channel, routingKey, serviceType} = data
    # @addRoutingKeyBySocketId socketId, routingKey
    switch serviceType
      when 'bongo' then @joinBongoClient data, routingKey, socketId
      when 'kite'  then @joinKiteClient data, routingKey, socketId
