+getSessionToken=-> $.cookie('clientId')
+
 KD.remote = new Bongo
 
   precompileApi: KD.config.precompiledApi ? no


  getUserArea:-> KD.getSingleton('groupsController').getUserArea()

  getSessionToken:-> $.cookie('clientId')

  # createRoutingKey:(service, event)->
    # "client.#{Bongo.createId()}.#{KD.whoami().profile.nickname}.#{service}.#{event}"


  mq: do->
    { broker:{ servicesEndpoint }, authExchange } = KD.config
    options = { servicesEndpoint, authExchange, autoReconnect: yes, getSessionToken }
    broker = new KDBroker.Broker null, options