activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Patrick Bedell" <>
Subject Re: communicating with Topic subscribers from custom interceptor class
Date Mon, 27 Nov 2006 20:33:48 GMT

On 11/27/06, James Strachan <> wrote:
> On 11/27/06, J. Patrick Bedell <> wrote:
> >    I'm writing a custom interceptor that extends BrokerFilter in order
> > to process messages that are published to particular Topics.  My
> > question is, how can my interceptor make a direct connection with the
> > JMS client that published the message?
> What kind of thing are you trying to do?

   The custom interceptor creates a marketplace, and clients send
digital financial instruments.  The interceptor must keep track of the
originator of the messages that include these assets, because the
client must be able to retrieve its asset from the interceptor when it
chooses.  Also, the interceptor must be able to initiate messages to a
client when a trade has been executed, to inform them of the execution
of a trade and to deliver the result.

   What I would really like to do is have some way of, from the
interceptor, initiate communication with a subscriber that has
previously sent a message that is published to a Topic that is
processed by the interceptor.

> > Does the subscriber have to
> > manually set an identifier in order to be accessible, or are the
> > identifiers automatically generated?
> Subscribers are visible in JMX or the BrokerService via their unique
> generated consumerId's.

   Should I just expect the clients to subscribe to a per-client queue
so that there is a per-client control channel, so that the market
server (i.e., the interceptor class) can communicate with the client?

> >    Additionally, is there a way to access the list of subscribers to a
> > particular topic and send messages to individual subscribers from a
> > custom interceptor class?
> Not easily. What are you trying to do - maybe there's an easier way.

   Thanks again!


> James
> -------

   J. Patrick Bedell

View raw message