[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Wild card Subscriptions

timfox do-not-reply at jboss.com
Mon Sep 15 04:32:49 EDT 2008


"ataylor" wrote : The pattern for wildcard subscriptions will be as follows. * will match against a single word and # will match against 0 or more words delimited by a .. so A.*.C will match A.B.C and A.E.D but not A.B.E.D, and A.B.# will match A.B.C.D or A.B ansd so forth, this is how amqp 0.9 specifies it.
  | 
  | A simple JMS client using Wild Card Subscriptions will look like the following:
  | 
  | 
  |   |          Topic wildCardTopic = session.createTopic("topic.*");
  |   |          MessageConsumer messageConsumer = session.createConsumer(wildCardTopic);
  |   | 
  | 

We should also allow a jms client to just create a JBossTopic instance directly specifying the wildcard.

Also how is this used via the core api?

Currently in PostOfficeImpl the bindings ad addresses are held in Maps and Lists, these will be replaced by an Address/Bindingsmanager that will do the following. 

One small issue is the management service doesn't support names with *'s in. To be honest i'm not sure whether we would add wild card addresses etc to the management servie, would they need to be accessible by the a management console?

When an address is added say A.B the address manager will take care of also adding any wildcard addresses that match , say A.* and A.#. The opposite will apply when addresses are removed.
When a Binding is added that uses a wild card pattern the address manager will also add bindings with the same underlying  queue to any addresses that match the wild card, so if a binding with address A.* and queue name subscriber1 was added then as binding with address A.B and the same queue would also be added.

Doing it this way means that all the work is done during the creation of the bindings and the route method of post office will be just as performant since a single look up will still only be involved.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176430#4176430

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176430



More information about the jboss-dev-forums mailing list