SUN IMQ 主题消息预览

发布于 2024-07-19 01:59:31 字数 119 浏览 4 评论 0原文

有什么方法可以查看驻留在 JMS 主题目标中的消息吗?

我遇到了消息未从主题目标释放的问题。 该主题有 1 个生产者和 7 个消费者,但没有一个是持久的。

在此先感谢您的任何建议。

Is there any way to view the messages that reside inside a JMS Topic destiantion?

I've got a problem with messages not being released from Topic destination. The Topic has got 1 producer and 7 consumers and none of them is durable.

Thanks in advance for any suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心是晴朗的。 2024-07-26 01:59:31

经过一番挖掘终于找到了答案。

我需要使用以下命令:

imqcmd list msg -t t -n my_topic -nocheck

其中 my_topic 是我的主题目标的名称。
收到如下响应后:

Listing messages for the destination
------------------------------------
Destination Name    Destination Type
------------------------------------
my_queue            Topic

On the broker specified by:

-------------------------
Host         Primary Port
-------------------------
localhost    7676

--------------------------------------------------------------------------------------------------
Message #   Message IDs                                                     Priority   Body Type
--------------------------------------------------------------------------------------------------
0           ID:9-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169630     4          TextMessage
1           ID:10-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169709    4          TextMessage
2           ID:11-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169717    4          TextMessage
3           ID:12-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169720    4          TextMessage
4           ID:13-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169723    4          TextMessage
5           ID:14-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169727    4          TextMessage

我可以使用此命令查看消息详细信息:

imqcmd query msg -t t -n my_topic -msgID "ID:9-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169630" -nocheck

它将打印类似以下内容:

Querying message:
------------------------------------------------------------
Message ID
------------------------------------------------------------
ID:9-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169630

In the destination
------------------------------------
Destination Name    Destination Type
------------------------------------
my_topic            Topic

On the broker specified by:

-------------------------
Host         Primary Port
-------------------------
localhost    7676

--------------------------
Message Header Information
--------------------------
Message ID                  ID:9-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169630
Correlation ID              TestCorrID
Destination Name            my_topic
Destination Type            Topic
Delivery Mode               PERSISTENT (2)
Priority                    4
Redelivered                 false
Timestamp                   7/30/08 3:32:49 PM
Type                        
Expiration                  12/31/69 4:00:00 PM
ReplyTo Destination Name    temporary_destination://topic/AAA.BBB.CCC.DDD/58798/1
ReplyTo Destination Type    

------------------------------
Message Properties Information
------------------------------
LongProp      6534
IntProp       3
StringProp    TestStringValue
DoubleProp    7.4687643E7

------------------------
Message Body Information
------------------------
Body Type    TextMessage (1)

之后可以使用命令删除消息:

imqcmd destroy msg -t t -n my_topic-msgID "ID:9-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169630" -nocheck

希望这可以帮助某人,有一天......

After some digging finally found out the answer.

I need to use the following command:

imqcmd list msg -t t -n my_topic -nocheck

where my_topic is the name of my topic destination.
After receiving a response like:

Listing messages for the destination
------------------------------------
Destination Name    Destination Type
------------------------------------
my_queue            Topic

On the broker specified by:

-------------------------
Host         Primary Port
-------------------------
localhost    7676

--------------------------------------------------------------------------------------------------
Message #   Message IDs                                                     Priority   Body Type
--------------------------------------------------------------------------------------------------
0           ID:9-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169630     4          TextMessage
1           ID:10-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169709    4          TextMessage
2           ID:11-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169717    4          TextMessage
3           ID:12-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169720    4          TextMessage
4           ID:13-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169723    4          TextMessage
5           ID:14-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169727    4          TextMessage

I can view Message details with this command:

imqcmd query msg -t t -n my_topic -msgID "ID:9-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169630" -nocheck

which willl print something like:

Querying message:
------------------------------------------------------------
Message ID
------------------------------------------------------------
ID:9-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169630

In the destination
------------------------------------
Destination Name    Destination Type
------------------------------------
my_topic            Topic

On the broker specified by:

-------------------------
Host         Primary Port
-------------------------
localhost    7676

--------------------------
Message Header Information
--------------------------
Message ID                  ID:9-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169630
Correlation ID              TestCorrID
Destination Name            my_topic
Destination Type            Topic
Delivery Mode               PERSISTENT (2)
Priority                    4
Redelivered                 false
Timestamp                   7/30/08 3:32:49 PM
Type                        
Expiration                  12/31/69 4:00:00 PM
ReplyTo Destination Name    temporary_destination://topic/AAA.BBB.CCC.DDD/58798/1
ReplyTo Destination Type    

------------------------------
Message Properties Information
------------------------------
LongProp      6534
IntProp       3
StringProp    TestStringValue
DoubleProp    7.4687643E7

------------------------
Message Body Information
------------------------
Body Type    TextMessage (1)

Afterwards the message can be deleted with command:

imqcmd destroy msg -t t -n my_topic-msgID "ID:9-AAA.BBB.CCC.DDD(e9:3b:c8:51:8b:75)-58798-1217457169630" -nocheck

Hope this helps someone, someday...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文