环境信息
- EMQX 版本:开源版本: 4.4.5
- 操作系统及版本:Linux Centos7.9 Docker
- 其他
问题描述
想使用java开发exhook相关功能,但是没有用过,看了官方的例子:
emqx/emqx-extension-examples at for-emqx-v44 (github.com)
想问一下
1)开源的emqx 4.4.5版本支持自定义exhook么?
2)如何配置和部署相关代码?
配置文件及日志
emqx_exhook.conf
##--------------------------------------------------------------------
## The Hook callback servers
## The gRPC server url
##
## exhook.server.$name.url = url()
exhook.server.default.url = http://127.0.0.1:9000
#exhook.server.default.ssl.cacertfile = etc/certs/cacert.pem
#exhook.server.default.ssl.certfile = etc/certs/cert.pem
#exhook.server.default.ssl.keyfile = etc/certs/key.pem
## Enables/disables periodic transmission on a connected socket when no other data is exchanged.
## If the other end does not respond, the connection is considered broken and an error message is sent to the controlling process.
##
## Default: true
#exhook.server.default.socket_options.keepalive = true
## If true, option TCP_NODELAY is turned on for the socket, which means that also small amounts of data are sent immediately.
##
## Default: true
#exhook.server.default.socket_options.nodelay = true
## The minimum size of the receive buffer to use for the socket.
#exhook.server.default.socket_options.recbuf = 64KB
## The minimum size of the send buffer to use for the socket.
#exhook.server.default.socket_options.sndbuf = 16KB
emqx_exproto.conf
##====================================================================
## EMQX ExProto
##====================================================================
exproto.server.http.port = 9100
exproto.server.https.port = 9101
exproto.server.https.cacertfile = etc/certs/cacert.pem
exproto.server.https.certfile = etc/certs/cert.pem
exproto.server.https.keyfile = etc/certs/key.pem
##--------------------------------------------------------------------
## Listeners
##--------------------------------------------------------------------
##--------------------------------------------------------------------
## MQTT/TCP - External TCP Listener for MQTT Protocol
## The IP address and port that the listener will bind.
##
## Value: <tcp|ssl|udp|dtls>://<ip>:<port>
##
## Examples: tcp://0.0.0.0:7993 | ssl://127.0.0.1:7994
exproto.listener.protoname = tcp://0.0.0.0:7993
## The ConnectionHandler server address
##
exproto.listener.protoname.connection_handler_url = http://127.0.0.1:9001
#exproto.listener.protoname.connection_handler_certfile =
#exproto.listener.protoname.connection_handler_cacertfile =
#exproto.listener.protoname.connection_handler_keyfile =
## The acceptor pool for external MQTT/TCP listener.
##
## Value: Number
exproto.listener.protoname.acceptors = 8
exhook-svr-java项目
exproto-svr-java项目
放到服务器上一直报:没有主清单属性