This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
Once I receive a request, I check for some required fields. If they are present they are routed to be processed; or else the request will be rejected. I am using map based channel resolver to determine which way the message would be routed in combination with the router.
The configuration you posted was all i needed to understand your use case
Between M7 and RC1 Routers underwent major refactoring which now makes configuration of every router much simpler and most importantly more consistent. It also introduces a support for DynamicRouter pattern across all routers.
I'll try to be brief, but if you can also read the new section in the docs "Dynamic Router support" to get more details.
Anyway, your configuration is perfectly valid with the exception of MapBasedChannelResolver being removed (you can still inject your own implementation of ChannelResolver though), but it is also unnecessary since every router by default is injected with BeanFactoryChannelResolver.
I also understand that BeanFactoryChannelResolver by itself is not going to help you in your use case simply because your router implementation returns a boolean value 'true' or 'false' and you want to map this value to a channel and that is why you were using CR.
Well, we removed MapBasedChannelResolver in favor of defining a channel identifier map at the base class for all routers. This map is empty by default but. . .
If you think about routing use case it consists of 3 steps:
1. Compute channel identifier - that is what your implementation does
2. Map channel identifier to channel name - this is what the MapBasedChannelResolver did
3. Resolve channel name to MessageChannel instance - this is done by BeanFactoryChannelResolver
Step 2 is optional which means that if channel identifier map is empty, then channel identifier will be treated as channel name, which means in your case if you had two channels named 'true' and 'false' you don't need any mappings at all. But obviously those are bad names and that is why you want to explicitly map these values to specific channel instances.
All you need to do is this: