简体   繁体   English

队列jms [wso2]消息代理。 回叫服务

[英]queue jms [wso2] message broker. callback service

Good morning, I am currently managing a queue jms [wso2] message broker. 早上好,我目前正在管理一个队列jms [wso2]消息代理。 I have a java client who sends a message in the queue and a java ServletContextListener which activates every time a message is being delivered. 我有一个Java客户端,它在队列中发送消息,还有一个Java ServletContextListener,它在每次传递消息时都会激活。 And everything works ok. 而且一切正常。 My bosses have asked me now if it was possible that once the message arrives in the queue, it automatically makes a call to a service. 我的老板们现在问我,是否有可能,一旦消息到达队列中,它就会自动拨打服务电话。 I was reading something like [wso2] ESB Message Processor. 我正在阅读类似[wso2] ESB消息处理器的内容。 My questions are: 我的问题是:

1) Is it possible to do such a thing without using [wso2] ESB? 1)是否可以在不使用[wso2] ESB的情况下执行此操作? but only [wso2] message Broker. 但只有[wso2]消息代理。 If you have some ideas. 如果您有一些想法。

2) at this point [wso2] ESB would be a consumer and a call from them? 2)此时[wso2] ESB将会是消费者,而他们会打来电话?

3) If someone can give me an example of how to handle the ESB once the message ne [wso2] Message Broker has arrived. 3)如果有人收到消息ne [wso2] Message Broker后,如何处理ESB的示例,请给我。

Thanks in advance 提前致谢

Not sure if I got it right, but here are some thoughts that come into my mind. 不知道我是否做对了,但是我想到了一些想法。

1.) I'm not familiar with wso2 mb (using activemq) but I assume that its not possible according to the documentation 1.)我不熟悉wso2 mb(使用activemq),但是根据文档,我认为这是不可能的

2.) Yes, the esb acts as a message consumer (like your java client) and can do various things then. 2.)是的,esb充当消息使用者(例如Java客户端),然后可以做各种事情。 You can call other services, forward the message to another queue etc...Maybe the ESB can do the things you're servlet is doing 您可以调用其他服务,将消息转发到另一个队列等...也许ESB可以完成您正在执行的servlet的工作

3.)You can create a simple proxy in esb that takes the jms message and forwards it to your servlet,service or whatever. 3)您可以在esb中创建一个简单的代理,该代理接收jms消息并将其转发到您的servlet,服务或其他任何东西。 There are plenty of cases, regarding jms messages the following link might help. 在很多情况下,关于jms消息,以下链接可能会有所帮助。

ESB JMS ESB JMS

One other thing I'm thinking of, if you send your jms message to a jms topic from your java client, you can then create several consumers for the same message. 我正在考虑的另一件事是,如果您从Java客户端将jms消息发送到jms主题,则可以为同一条消息创建多个使用者。 So your existing implementation will subscribe to that topic and you can create a simple second client (or use the esb) that connects to that topic as well. 因此,您现有的实现将订阅该主题,并且您可以创建一个简单的第二个客户端(或使用esb)来连接该主题。 Both will receive the same message and can do whatever processing is needed. 两者都会收到相同的消息,并且可以执行所需的任何处理。

Hope that helps. 希望能有所帮助。

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

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