3

I am looking to build a publish/subscribe distributed messaging framework that can manage huge volumes of message traffic with some intelligence at the broker level. I don't know if there's a topology that describes this, but this is the model I'm going after:

EXAMPLE MODEL A

A) There are two running message brokers (ideally all on localhost if possible, for easier demo-ing) :

  • Broker-A
  • Broker-B

B) Each broker will have 2 listeners and 1 publisher.

Example Figure

[subscriber A1, subscriber A2, publisher A1] <--> BrokerA <--> BrokerB <--> [publisher B1, subscriber B1, subscriber B2]

  • IF a message-X is published to broker A and there no subscribers for it among the listeners on Broker-B (via criteria in Message Selectors or Broker routing rules), then that message-X will never be published to Broker-B.

  • ELSE, broker A will publish the message to broker B, where one of the broker B listeners/subscribers/services is expecting that message based on the subscription criteria.

Is Clustering the Correct Approach?

At first, I concluded that the "Broker Clustering" concept is what I needed to support this. However, as I have come to understand it, the typical use of clustering entails either:

  • message redundancy across all brokers ... or
  • Competing Consumers pattern

... and neither of these satisfy the requirement in the EXAMPLE MODEL A.

What is the Correct Approach?

My question is, does anyone know of a JMS implementation that supports the model I described?

I scanned through all the stackoverflow post titles for the search: JMS and Cluster. I found these two informative, but seemingly conflicting posts:

  1. Says the EXAMPLE MODEL A is/should-be implicitly supported: JMS consumer with ActiveMQ network of brokers " this means you pick a broker, connect to it, and let the broker network sort it out amongst themselves. In theory."

  2. Says the EXAMPLE MODEL A IS NOT suported: How does a JMS Topic Subscriber in a clustered application server recieve messages? "All the instances of PropertiesSubscriber running on different app servers WILL get that message."

Any suggestions would be greatly appreciated.

Thanks very much for reading my post,

Gene

Community
  • 1
  • 1
Gene
  • 51
  • 4

2 Answers2

0

WebSphere MQ meets this requirement provided that:

  • The two queue managers are participating in a WebSphere MQ cluster;
  • and the message topic is either advertised to the cluster or is a sub-topic of a topic that is advertised to the cluster.

Assuming these requirements are met, the publications only flow to QMgrs where there is an active subscription. Additionally, it is possible to administratively specify the scope of a publication. Note that this applies to topics being published or subscribed and not message properties. The QMgr will locally filter messages based on properties but routing by property is a WebSphere Message Broker feature. (In the WebSphere family, WMQ is the base transport where WMB is a layer above and provides transformation, routing, etc.)

Chris Frederick
  • 5,482
  • 3
  • 36
  • 44
T.Rob
  • 31,522
  • 9
  • 59
  • 103
0

Here are some links that could solve your problem, with GlassFish server.

http://docs.sun.com/app/docs/doc/819-7759/aerdj?l=en&a=view

hope it helps.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
Razvan
  • 1