我正在使用交叉開關0.11.1,我想讓高速公路組件使用特定角色。當我添加了一個「角色」屬性來我的組件,如下圖所示:如何在Autobahn中設置組件角色
"components": [
{
"type": "class",
"classname": "hello.hello.AppSession",
"realm": "realm1",
"role": "anonymous",
"transport": {
"type": "websocket",
"endpoint": {
"type": "tcp",
"host": "127.0.0.1",
"port": 8080
},
"url": "ws://127.0.0.1:8080/ws"
}
}
]
我跑的時候crossbar start
2015-11-03T10:51:02-0600 [Controller 20933] Automatically choosing optimal Twisted reactor
2015-11-03T10:51:02-0600 [Controller 20933] Running on Linux and optimal reactor (epoll) was installed.
2015-11-03T10:51:02-0600 [Controller 20933] __ __ __ __ __ __ __ __
2015-11-03T10:51:02-0600 [Controller 20933] /`|__)/ \/__`/__`|__) /\ |__) |/ \
2015-11-03T10:51:02-0600 [Controller 20933] \__,| \\__/.__/.__/|__)/~~\| \. |\__/
2015-11-03T10:51:02-0600 [Controller 20933]
2015-11-03T10:51:02-0600 [Controller 20933] Version: 0.11.1
2015-11-03T10:51:02-0600 [Controller 20933]
2015-11-03T10:51:02-0600 [Controller 20933] Starting from node directory /home/jaime/code/pubsub/tmp/.crossbar
2015-11-03T10:51:02-0600 [Controller 20933] Loading node configuration file '/home/jaime/code/pubsub/tmp/.crossbar/config.json'
2015-11-03T10:51:02-0600 [Controller 20933] *** Configuration validation failed ***
2015-11-03T10:51:02-0600 [Controller 20933] invalid component configuration - encountered unknown attribute 'role'
我可能不得不試試這個。我可以發誓我看到一個允許這個地方的例子,但它可能已經老了。配置文件有時會讓我感到困惑。謝謝! – jaime
@jaime如果你*被文檔弄糊塗了,那麼提交一個描述什麼是混淆的bug(對https://github.com/crossbario/crossbar)會是非常有幫助的。越多的人進入一個項目,看到新人被掛斷的地方變得越難......:/ – meejah