The goal I'm working toward is having a WCF routing service that can receive messages from clients, persist them to some type of data store, and then process/send them to their destination WCF services.
Things to consider:
- You can create a routing service by using the ClientViaBehavior (outlined here and here)
- The ClientViaBehavior will not work with basicHttpBinding, so I need to use wsHttpBinding (basicHttpBinding doesn't set the "To" header on the message, found out the hard way)
- The WCF Message object itself is sent to the Routing Service, where it can be persisted as a serialized string
- I don't want the Routing Service to know what's in the message - consequently, the service will not have a reference to the Data Contracts involved
- When the time comes to route the Message to its destination, I need to be able to create a channel between the Routing Service and the Destination Service
- It is not desirable for the Routing Service to be aware of each destination service - ideally, WCF could create the proper channel dynamically based on the content/headers of the message being processed.
Is this too much to ask of WCF? (I have a feeling it might be...)
Any advice on how to accomplish something like this would be appreciated.