Commit 912445b2 authored by 赵文静's avatar 赵文静

补充新闻rabbitmq

parent fbadde17
Pipeline #5264 passed with stage
in 0 seconds
#POST https://nlu.gree.com/semantic/unisoundc2c/querys
POST https://testnlu.gree.com/semantic/unisoundc2c/querys
#POST http://172.28.124.216:9999/semantic/unisoundc2c/querys
#POST http://172.28.5.39:9999/semantic/unisoundc2c/querys
Content-Type: application/json
{
"reqParam": {
"common": {
"appKey": "ilcsnav5otwalqnkzliyfh5tbrbjkjomtjgiojih",
"imei": "hb-0242DFEC61F4",
"remoteIP": "47.103.18.223",
"requestId": "123456111",
"trafficParameter": "mode=childxxx;macWifi=28b77c218ed1;mid=10f05;vender=7e000025;macVoice=testyuntiancloud;ver=3.0;scenario=smarthome;filterName=nlu;req_nlu_length=1;returnType=json;fullDuplex=true;appendLength=1;additionalService=geli_nlu2;version=0.5;filterUrl=https://testnlu.gree.com:443/semantic/unisoundc2c/querys;"
},
"nluRet": {
"text": "明天的呢"
},
"postProc": {}
}
}
###
POST http://localhost:19992/semantic/unisoundc2c/child/querys/v2
Content-Type: application/json
{
"reqParam": {
"common": {
"remoteIP": "14.215.222.17",
"requestId": "1234568222",
"trafficParameter": "ver=3.0;scenario=smarthome;filterName=nlu2;req_nlu_length=2;returnType=json;fullDuplex=true;appendLength=1;additionalService=geli_nlu;mid=11011;version=0.5;macWifi=28b77c23817b1234111111;macVoice=28b77c23817b1234111111"
},
"nluRet": {
"asr_recongize": "",
"text": "明天呢"
}
},
"version": "v0"
}
###
# POST https://nlu.gree.com/semantic/unisoundc2c/querys
POST https://nlu.gree.com/semantic/unisoundc2c/querys
Content-Type: application/json
# ;macWifi=f4911e968a48;macVoice=c46e7b7624fc
{
"reqParam": {
"common": {
"appKey": "nq3qd4ur4pt6c6pjulf4tfpirl6jkzxakueuy4yr",
"imei": "hb-0242DFEC61F4",
"remoteIP": "182.84.16.132",
"requestId": "123456456456465456",
"trafficParameter": "mode=childxx;macWifi=ece154a73d38;mid=11011;macVoice=testyuntiancloud;ver=3.0;scenario=smarthome;filterName=nlu;req_nlu_length=1;returnType=json;fullDuplex=true;appendLength=1;additionalService=geli_nlu2;version=0.5;filterUrl=https://testnlu.gree.com:443/semantic/unisoundc2c/querys;"
},
"nluRet": {
"text": "播放音乐"
},
"postProc": {}
}
}
\ No newline at end of file
......@@ -12,6 +12,7 @@ RabbitMq:
Url: amqp://iot:qwe!23@172.28.124.106:5672/voice
ExchangeName: voice.media.ctrl
ExchangeType: direct
RoutingKey: mqHandle
Logger:
LogFileName: tencent-nlu-parse
......
......@@ -152,7 +152,7 @@ func setupFlag() error {
flag.StringVar(&serverTag, "tag", "", "注册到注册中心的标签")
flag.StringVar(&ip, "ip", "", "IP")
flag.IntVar(&port, "port", 0, "端口")
flag.StringVar(&consulUrl, "consul", "http://172.28.124.105:8500", "consul服务地址")
flag.StringVar(&consulUrl, "consul", "http://172.28.124.106:8500", "consul服务地址")
flag.StringVar(&config, "config", "env/v2,speech_nlu_parse/conf", "指定要使用的配置文件路径")
flag.BoolVar(&isVersion, "version", false, "编译信息")
flag.StringVar(&consulToken, "token", "092288b5-824f-854c-39aa-a958afd9a633", "consul token")
......
......@@ -101,6 +101,7 @@ type RabbitMqSettings struct {
Url string
ExchangeName string
ExchangeType string
RoutingKey string
}
func (s *Setting) ReadSection(k string, v interface{}) error {
......
......@@ -103,7 +103,7 @@ func (c *Consumer) setup() error {
}
// 绑定队列
routingKey := "mqhandle"
routingKey := global.RabbitMqSetting.RoutingKey
if err := c.channel.QueueBind(
queue,
routingKey,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment