JMS消息和JMS消息的负载平衡 [英] JMS messages and load balancing of JMS messages

查看:129
本文介绍了JMS消息和JMS消息的负载平衡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遇到此设计问题,并尝试找到使用JMS实施该问题的最佳方法.

Have this design problem and trying to find a best way to implement it using JMS.

Web应用程序具有单个侦听器,多个生产者和多个WorkerBee.侦听器将消息从其队列推送到WorkerBee.产生的所有消息都在侦听器中排队.我要实现一个流程,以便可以使用某种负载平衡流程将消息从侦听器队列发送到每个WorkerBee.消息的单个实例仅出现在侦听器队列或WorkerBee队列中.

Web App has single Listener and multiple Producer and multiple WorkerBee. Listener pushes messages from its queue to WorkerBee. All of the messages produced are queued in a Listener. I want to implement a process than can send messages from Listener queue to each WorkerBee using some kind of load balancing process. Only single instance of the message occurs in the Listener queue or in the WorkerBee queue.

什么是最好的方法?在这里,JMS听起来是一个不错的选择吗?我如何将消息从侦听器队列推送到WorkerBee队列?

Whats the best way to do it? Does JMS sounds like a good choice here? How would I push the message from Listener queue to WorkerBee queue?

欢迎您提出建议:)并感谢您的答复.

Open for suggestion :) And appreciate your response.

推荐答案

消息传递是完成此任务的不错选择.我认为您应该使用 Apache Camel 框架作为路由平台来达到上述目的.它允许以非常优雅的方式从集成级别划分业务逻辑.

Messaging is good choice for such task. I think you should use Apache Camel framework as routing platform for described purposes. It allows to divide business logic from integration level in quite graceful way.

骆驼支持许多现成的组件,包括 JMS端点. 您可以使用负载均衡器模式委派给其中一个WorkerBee.

Camel supports plenty of components "out-of-box" including JMS endpoints. You can delegate to one of your WorkerBee's using Load Balancer pattern.

这篇关于JMS消息和JMS消息的负载平衡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆