𝑰’𝒎 𝒉𝒉𝒈, 𝑰 𝒂𝒎 𝒂 𝒈𝒓𝒂𝒅𝒖𝒂𝒕𝒆 𝒔𝒕𝒖𝒅𝒆𝒏𝒕 𝒇𝒓𝒐𝒎 𝑵𝒂𝒏𝒋𝒊𝒏𝒈, 𝑪𝒉𝒊𝒏𝒂.
- 🏫 𝑺𝒉𝒄𝒐𝒐𝒍: 𝑯𝒐𝒉𝒂𝒊 𝑼𝒏𝒊𝒗𝒆𝒓𝒔𝒊𝒕𝒚
- 🌱 𝑳𝒆𝒂𝒓𝒏𝒊𝒏𝒈: 𝑰’𝒎 𝒄𝒖𝒓𝒓𝒆𝒏𝒕𝒍𝒚 𝒍𝒆𝒂𝒓𝒏𝒊𝒏𝒈 𝒅𝒆𝒔𝒊𝒈𝒏 𝒑𝒂𝒕𝒕𝒆𝒓𝒏, 𝑳𝒆𝒆𝒕𝒄𝒐𝒅𝒆, 𝒅𝒊𝒔𝒕𝒓𝒊𝒃𝒖𝒕𝒆𝒅 𝒔𝒚𝒔𝒕𝒆𝒎, 𝒎𝒊𝒅𝒅𝒍𝒆𝒘𝒂𝒓𝒆 𝒂𝒏𝒅 𝒔𝒐 𝒐𝒏.
- 💓 𝑯𝒐𝒘 𝒕𝒐 𝒓𝒆𝒂𝒄𝒉 𝒎𝒆:𝑽𝑿
- 📚 𝑴𝒚 𝒃𝒍𝒐𝒈: 𝒉𝒕𝒕𝒑𝒔://𝒉𝒉𝒈𝒚𝒚𝒅𝒔.𝒃𝒍𝒐𝒈.𝒄𝒔𝒅𝒏.𝒏𝒆𝒕/
- 💼 𝑷𝒓𝒐𝒇𝒆𝒔𝒔𝒊𝒐𝒏𝒂𝒍 𝒔𝒌𝒊𝒍𝒍𝒔:𝒎𝒚 𝒅𝒓𝒆𝒂𝒎
1 问题描述
咱就是说,消费过后的消息怎么看呢?于是我找到了Trace 这个插件,我们只要进入docker容器里面,或者你怎么部署的也行,找到了之后开启这个插件就行
1.1 命令启动trace插件
启动命令
rabbitmq-plugins enable rabbitmq_tracing
rabbitmqctl trace_on
文章来源:https://www.toymoban.com/news/detail-607299.html
1.2 查看日志文件
需要注意的是,windows上面有编解码问题,可能是乱码,最好还是去Linux里面把日志文件弄下来,或者直接在里面查看吧。记录一下日志路径:text类型是比较适合人看的,json类型是用过BASE64编码过的,所以看你的需求。文章来源地址https://www.toymoban.com/news/detail-607299.html
/var/tmp/rabbitmq-tracing
root@rabbitmq1:/var/tmp/rabbitmq-tracing# cat test.log
================================================================================
2022-08-25T10:40:21.280+00:00: Message published
Node: rabbit@rabbitmq1
Connection: 192.168.2.35:64833 -> 172.18.0.2:5672
Virtual host: /
User: rabbitmq
Channel: 2
Exchange: springOperLogExchange
Routing keys: [<<"springOperLog">>]
Routed queues: [<<"springOperLogQueue">>]
Properties: [{<<"priority">>,signedint,0},
{<<"delivery_mode">>,signedint,2},
{<<"headers">>,table,
[{<<"__TypeId__">>,longstr,
<<"com.ruoyi.system.api.domain.SysOperLog">>}]},
{<<"content_encoding">>,longstr,<<"UTF-8">>},
{<<"content_type">>,longstr,<<"application/json">>}]
Payload:
{"searchValue":null,"createBy":null,"createTime":null,"updateBy":null,"updateTime":null,"remark":null,"params":{},"operId":null,"title":"个人信息","businessType":2,"businessTypes":null,"method":"com.ruoyi.system.controller.SysProfileController.updatePwd()","requestMethod":"PUT","operatorType":1,"operName":"admin","deptName":null,"operUrl":"/user/profile/updatePwd","operIp":"127.0.0.1","operParam":"admin1234 admin123","jsonResult":"{\"msg\":\"操作成功\",\"code\":200}","status":0,"errorMsg":null,"operTime":null}
================================================================================
2022-08-25T10:40:21.280+00:00: Message received
Node: rabbit@rabbitmq1
Connection: 192.168.2.35:64833 -> 172.18.0.2:5672
Virtual host: /
User: rabbitmq
Channel: 1
Exchange: springOperLogExchange
Routing keys: [<<"springOperLog">>]
Queue: springOperLogQueue
Properties: [{<<"priority">>,signedint,0},
{<<"delivery_mode">>,signedint,2},
{<<"headers">>,table,
[{<<"__TypeId__">>,longstr,
<<"com.ruoyi.system.api.domain.SysOperLog">>}]},
{<<"content_encoding">>,longstr,<<"UTF-8">>},
{<<"content_type">>,longstr,<<"application/json">>}]
Payload:
{"searchValue":null,"createBy":null,"createTime":null,"updateBy":null,"updateTime":null,"remark":null,"params":{},"operId":null,"title":"个人信息","businessType":2,"businessTypes":null,"method":"com.ruoyi.system.controller.SysProfileController.updatePwd()","requestMethod":"PUT","operatorType":1,"operName":"admin","deptName":null,"operUrl":"/user/profile/updatePwd","operIp":"127.0.0.1","operParam":"admin1234 admin123","jsonResult":"{\"msg\":\"操作成功\",\"code\":200}","status":0,"errorMsg":null,"operTime":null}
到了这里,关于Rabbitmq怎么看消费过了的消息呢?的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!