I have a clustered app which allows for N JVMs to be added. I already have discovery and group management taken care of. I want to introduce Spring Integration to simplify my messaging architecture (now written using custom JMS).

The problem I'm trying to solve is this:

My "worker" nodes are intended to load and cache expensive data. Worker instance "A" may have a cache for NYC, Worker instance "B" may have a cache for Paris, etc. If a request comes into the system for something about NYC, and NYC's cached data is already on worker "A", I want to route the request to that specific worker.

How do I model this kind of system in Spring Integration? Should each live worker have its own channel, and use a router for each channel? If so, should I be I dynamically creating channels when nodes join the system and use a DynamicRouter to route to them, and implement affinity that way?

thanks!