环境信息
- EMQX 版本:开源版
- 操作系统及版本:windows
- 其他
问题描述
client.connected,session.created,session.resumed,钩子事件里面调用http api 进行订阅,报错 112 客户端不存在,客户端验证成功后,应该在那个事件调用才不报错?
在client.subscribe 钩子里面我不允许客户端私自订阅主题,默认报错的
responseObserver.onError(new Exception(rs));
,但是主题客户端还是能够订阅,日志如下,是我用法不对吗?
配置文件及日志
@127.0.0.1:56367 [ExHook Svr] CALL emqx_exhook_v_1_hook_provider_client:on_client_subscribe(#{clientinfo => #{anonymous => true,clientid => <<“ai_admin”>>,cn => <<>>,dn => <<>>,is_superuser => false,mountpoint => <<>>,node => <<“emqx@127.0.0.1”>>,password => <<>>,peerhost => <<“127.0.0.1”>>,protocol => <<“mqtt”>>,sockport => 11883,username => <<“admin”>>},meta => #{cluster_name => “emqxcl”,node => <<“emqx@127.0.0.1”>>,sysdescr => “EMQ X”,version => “4.4.3”},props => [],topic_filters => [#{name => <<“asb”>>,qos => 0}]}, #{channel => “default”,pool_size => 8,timeout => 5000}) error: {deadline_exceeded,<<“Waiting for response timeout”>>}