上海古都建筑设计集团,上海办公室装修设计公司,上海装修公司高质量的内容分享社区,上海装修公司我们不是内容生产者,我们只是上海办公室装修设计公司内容的搬运工平台

Rabbitmq怎么看消费过了的消息呢?

guduadmin11天前

𝑰’𝒎 𝒉𝒉𝒈, 𝑰 𝒂𝒎 𝒂 𝒈𝒓𝒂𝒅𝒖𝒂𝒕𝒆 𝒔𝒕𝒖𝒅𝒆𝒏𝒕 𝒇𝒓𝒐𝒎 𝑵𝒂𝒏𝒋𝒊𝒏𝒈, 𝑪𝒉𝒊𝒏𝒂.

  • 🏫 𝑺𝒉𝒄𝒐𝒐𝒍: 𝑯𝒐𝒉𝒂𝒊 𝑼𝒏𝒊𝒗𝒆𝒓𝒔𝒊𝒕𝒚
  • 🌱 𝑳𝒆𝒂𝒓𝒏𝒊𝒏𝒈: 𝑰’𝒎 𝒄𝒖𝒓𝒓𝒆𝒏𝒕𝒍𝒚 𝒍𝒆𝒂𝒓𝒏𝒊𝒏𝒈 𝒅𝒆𝒔𝒊𝒈𝒏 𝒑𝒂𝒕𝒕𝒆𝒓𝒏, 𝑳𝒆𝒆𝒕𝒄𝒐𝒅𝒆, 𝒅𝒊𝒔𝒕𝒓𝒊𝒃𝒖𝒕𝒆𝒅 𝒔𝒚𝒔𝒕𝒆𝒎, 𝒎𝒊𝒅𝒅𝒍𝒆𝒘𝒂𝒓𝒆 𝒂𝒏𝒅 𝒔𝒐 𝒐𝒏.
  • 💓 𝑯𝒐𝒘 𝒕𝒐 𝒓𝒆𝒂𝒄𝒉 𝒎𝒆:𝑽𝑿
  • 📚 𝑴𝒚 𝒃𝒍𝒐𝒈: 𝒉𝒕𝒕𝒑𝒔://𝒉𝒉𝒈𝒚𝒚𝒅𝒔.𝒃𝒍𝒐𝒈.𝒄𝒔𝒅𝒏.𝒏𝒆𝒕/
  • 💼 𝑷𝒓𝒐𝒇𝒆𝒔𝒔𝒊𝒐𝒏𝒂𝒍 𝒔𝒌𝒊𝒍𝒍𝒔:𝒎𝒚 𝒅𝒓𝒆𝒂𝒎

    Rabbitmq怎么看消费过了的消息呢?,       ,第1张

    1 问题描述

      咱就是说,消费过后的消息怎么看呢?于是我找到了Trace 这个插件,我们只要进入docker容器里面,或者你怎么部署的也行,找到了之后开启这个插件就行

    1.1 命令启动trace插件

    启动命令

    rabbitmq-plugins enable rabbitmq_tracing
    rabbitmqctl trace_on
    

    Rabbitmq怎么看消费过了的消息呢?,在这里插入图片描述,第2张

    1.2 查看日志文件

      需要注意的是,windows上面有编解码问题,可能是乱码,最好还是去Linux里面把日志文件弄下来,或者直接在里面查看吧。记录一下日志路径:text类型是比较适合人看的,json类型是用过BASE64编码过的,所以看你的需求。

    /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}
    

网友评论

搜索
最新文章
热门文章
热门标签