2

JMSブローカーで次のことが可能かどうか疑問に思っています。

クラスター モードで実行されるサービスのインスタンスが N 個あります。各インスタンスには、トピックからのビジネス イベントを処理する JMS 永続サブスクライバーがあります。

問題は、これらのサブスクライバーの 1 つだけがイベントを受信するように構成することは可能かということです。(基本的に、永続サブスクライバーのグループは、キューから消費しているかのように動作します)。

キューでこれが可能であることはわかっていますが、複数のビジネス イベントをリッスンするさまざまなサービス (すべてクラスター化) があります。

4

3 に答える 3

0

これが役立つ場合...

ノードが(N1、N2、N3)と言うクラスター環境であり、特定のJMSメッセージが特定のMDBキュー(この場合はサブスクライバー)によって処理されるようにするプロジェクトでは、次のことを行いました。

A. Create two MDB queue MDB1 and MDB2.
B. Used `MDBNotificationListenerMBean` to stop MDB1 on N2
C. Used `MDBNotificationListenerMBean` to stop MDB2 on N1 & N3.

さまざまなキューにメッセージを投稿しました...

現在、MDB1はN1とN3で使用可能であり、MDB2はN2でのみメッセージをリッスンします。

于 2012-08-13T12:38:13.440 に答える
0

I am curios, you mention multiple instance of the same application run on multiple nodes, those instanced will be communicating with the same broker right? If so, all instances can share the same JMS queue for processing business events. In such case, large number of queues are not required. You can have one queue for all instances of an application. Do you see any issues with this approach?

At this time, no broker implementations provide the behavior you are looking for.

于 2012-08-29T03:54:51.830 に答える