Skip to content

config_toml

phachon edited this page Jun 6, 2018 · 2 revisions

config

listen

[listen]
# manager api server
api = "0.0.0.0:3302"
# publish server
publish = "0.0.0.0:3303"

api

[api]
# is open api server
disable = false
# api server auth token http header token name
tokenHeaderName = "WMQX_API_TOKEN"
# api server auth token http header token value
token = "guest"

publish

[publish]
# publish server auth message token http header token name
messageTokenHeader = "WMQX_MESSAGE_TOKEN"
# publish server auth message route_key http header route_key name
messageRouteKeyHeader = "WMQX_MESSAGE_ROUTEKEY"
# these http headers will be ignored when access to consumer's url
# Headers : "User-Agent Token RouteKey Host Expect Accept-Encoding  Content-Length Connection"  will be ignored by force
ignoreHeaders = [
    "WMQX_MESSAGE_TOKEN",
    "WMQX_MESSAGE_ROUTEKEY",
]
# the publisher's real ip will be set in this http header when access to consumer's url
realIpHeader = "X-Forwarded-For"

consume

[consume]
# consumer url consume fail retry sleep timeout (s)
failRetryTime = 5

rabbitmq

[rabbitmq]
host = "127.0.0.1"
port = 5672
username = "test"
password = "123456"
vhost = "/"
poolNumber = 20
heartbeat = 2
connTimeout = 4
# wmqx exchange name prefix
prefix = "wmqx."

message

[message]
# The type of the record message, currently only support file
record_type="file"
# message info filename
filename="./message.json"
# is json beautify
jsonBeautify=true

log

# log config (https://github.com/phachon/go-logger)
[log.console]
level="debug"
color=true
jsonFormat=false
showFileLine=false

[log.file]
level="debug"
filename="log/wmqx.log"
maxSize=1048576
maxLine=1000000
dateSlice="d"
jsonFormat=true

[log.file.levelFilename]
error="log/error.log"
info="log/info.log"
Clone this wiki locally