Hi,
I have a few questions.
Here is what I want to do:
I have a server that offers messages of different types over the same SubscribableChannel. The messages shall be transferred via JMS.
Now I have a bunch of clients running on different computers and each client accepts only one type of message.
However there may be several clients for the same type of message. Each message
should only be processed by one client, so I don't want them simply sent to each of
them but rather have a dispatcher take care of selecting one out of the pool of clients
that accepts the message type.
So now as I understand it I can do the following:
Implement my own AbstractSubscribableChannel with perhaps a RoundRobinDispatcher
that selects a client by sending a message to the first client in the list and then if a MessageRejectedException. occurs skips to the next one until it finds a client that will accept the message.
Each client could then register at the channel providing a custom filter that detects acceptable messages and rejects all others.
Now my first question:
The messages can easily be several 100kb and as I understand it in my approach they would maybe transmitted several times over the network until a client is found that accepts the message.
Is this right or does the filter register with the server when the client subscribes to the channel and is executed before the message is sent?
If I'm right what would be the right approach to handle that scenario?
Maybe writing my own dispatcher that allows special handlers to register that carry a filter expression with them so that I can do the filtering on the server side?
Please forgive me if I got something horribly wrong since I'm both new to JMS and SI
Any help would be greatly appreciated![]()



Reply With Quote
