简体   繁体   English

IMB MQ:从队列中获取消息之前要离开队列。 Java的

[英]IMB MQ: Getting message from queue before it leaves it. Java

For example, I have a queue manager with two queues. 例如,我有一个带有两个队列的队列管理器。 I put message to Q1 than is goes to another queue Q2 . 我将消息发送到Q1,而不是发送到另一个队列Q2 And in Q1 my message get some new things in it's body, like unique ID. 第一季度,我的邮件中包含一些新内容,例如唯一ID。

So the question is Can I somehow using Java get my message from Q1 before it goes to Q2 ? 因此,问题是我可以使用Java以某种方式从Q1获得消息,然后再传递给Q2吗? Or at least get some info about it. 或者至少获得一些有关它的信息。

Actually this example is very simplificated and I just want to know is it possible to get message before it leaves the queue. 实际上,这个示例非常简化,我只想知道是否有可能在消息离开队列之前获取消息。

Update: 更新:

I also have a message broker with some logic. 我也有一个具有某些逻辑的消息代理。 My queue manager and it's queues are local. 我的队列管理器及其队列是本地的。 Q2 is a transmission queue, from which message is send to adapter. Q2是一个传输队列,消息从该队列发送到适配器。 So I'm interesteg in browsing my message which I put in Q1 before it goes to adapter or Q2 . 因此,我感兴趣的是浏览在Q1放入适配器或Q2之前输入的消息。 Can I make it with Java classes or JMS without changing message flow triggers and handlers or changing adapter source code? 我可以使用Java类或JMS来实现它,而无需更改消息流触发器和处理程序或更改适配器源代码吗?

Your question is not very clear. 您的问题不是很清楚。 Messages in a local queue do not magically move from one queue to another queue. 本地队列中的消息不会神奇地从一个队列移至另一队列。 You should update your question and be more precise on what type of queues you are using. 您应该更新您的问题,并更精确地确定所使用的队列类型。

Is Q1 a cluster or remote queue? Q1是群集还是远程队列?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM