emqx 5.x exhook message bridge rocketmq、rabbitmq、rabbitmq-stream 、kafka、redis-stream
859
vim /etc/go_emqx_exhook/config.yaml
appName: go_emqx_exhook
port: 16565
# Rocketmq or Rabbitmq or RabbitmqStream or Kafka or Redis
mqType: Rocketmq
# grpc server tls
tls:
enable: true
caFile: certs/ca/ca.crt
certFile: certs/server/server.crt
keyFile: certs/server/server.key
# emqx topic
bridgeRule:
topics:
- "/#"
# rocketmq configuration, you need to create a topic in advance
rocketmqConfig:
nameServer:
- 127.0.0.1:9876
topic: emqx_exhook
tag: exhook
groupName: exhook
#accessKey: exhook
#secretKey: exhook
# rabbitmq configuration, you need to create a switch in advance and bind a queue
rabbitmqConfig:
addresses:
- amqp://guest:[email protected]:5672
exchangeName: emqx_exhook
routingKeys: exhook
# tls:
# enable: true
# tlsSkipVerify: true
# caFile: /apps/server.cer.pem
# certFile: /apps/client.cer.pem
# keyFile: /apps/client.key.pem
# rabbitmq stream configuration, you need to create a stream in advance
rabbitmqStreamConfig:
addresses:
- rabbitmq-stream://guest:[email protected]:5552
streamName: emqx_exhook
# number of senders
maxProducersPerClient: 2
# tls:
# enable: true
# tlsSkipVerify: true
# caFile: /apps/server.cer.pem
# certFile: /apps/client.cer.pem
# keyFile: /apps/client.key.pem
# kafka configuration, you need to create a topic in advance
kafkaConfig:
addresses:
- 127.0.0.1:9092
topic: emqx_exhook
# compression type support: "none", "gzip", "snappy", "lz4", "zstd", default: "none"
compressionCodec: none
# sasl:
# enable: true
# user: admin
# password: admin123456
# tls:
# enable: true
# tlsSkipVerify: true
# caFile: /apps/server.cer.pem
# certFile: /apps/client.cer.pem
# keyFile: /apps/client.key.pem
# redis configuration
redisConfig:
addresses:
- 127.0.0.1:6379
streamName: emqx_exhook
# The maximum number of messages in a topic. If the number exceeds the limit, the first message will be automatically removed. -1 means no limit
streamMaxLen: 100000
db: 0
# username: redis123
# password: redis123456
# masterName: mymaster
# sentinelUsername: sentinel123456
# sentinelPassword: sentinel123456
# message send method "queue or direct", default: queue
# queue: after receiving the message, enter the queue and send it in batch when the queue conditions are met.
# direct: send immediately after receiving the message
# info: Rabbitmq and Redis do not support queue
sendMethod: queue
# queue configuration batchSize and lingerTime only satisfy one of them
queue:
# when the number of messages in the queue reaches 100, batch send
batchSize: 100
workers: 2
# after receiving the message, regardless of whether the number of messages in the queue is satisfied, it will be sent within 1 second.
lingerTime: 1
grpc server support tls append to /etc/go_emqx_exhook/config.yaml
appName: go_emqx_exhook
port: 16565
# grpc server tls
tls:
enable: true
caFile: certs/ca/ca.crt
certFile: certs/server/server.crt
keyFile: certs/server/server.key
Emqx > ExHook > URL: Must start with https for example : https://127.0.0.1:16565
docker run -d --name go_emqx_exhook -p 16565:16565 \
-v /etc/go_emqx_exhook/config.yaml:/apps/config.yaml \
-v /etc/localtime:/etc/localtime:ro \
--restart=always thousmile/go_emqx_exhook:1.6
vim docker-compose.yml
version: '3'
networks:
app-net1:
ipam:
config:
- subnet: 172.19.0.0/16
gateway: 172.19.0.1
services:
go_emqx_exhook:
image: thousmile/go_emqx_exhook:1.6
container_name: go_emqx_exhook
ports:
- "16565:16565"
volumes:
- /etc/go_emqx_exhook/config.yaml:/apps/config.yaml
- /etc/localtime:/etc/localtime:ro
privileged: true
restart: always
networks:
app-net1:
deploy:
resources:
limits:
memory: 258m
docker compose up -d go_emqx_exhook
Content type
Image
Digest
sha256:40cd65895…
Size
43.9 MB
Last updated
about 1 year ago
docker pull thousmile/go_emqx_exhook:2.3