Blogger :
Geekswithblogs.net
All posts :
All posts by Geekswithblogs.net
Category :
WSCF/WCF
Blogged date : 2008 Mar 03
There was a message at the Codeplex site from someone having issues doing a simple "receive file from folder, do dynamic endpoint resolution and deliver message". I threw together a little sample showing how this works, and blogged about it in case others need this too.
The moving parts involved are:
- receive location using the ItineraryReceivePassthrough pipeline
- dynamic send port using the ItinerarySendPassthrough pipeline
How it works:
- the message is received
- the ESB Dispatcher Disassembler calls the Resolver specified in the Endpoint (in this sample, the business rules engine, see below)
- the Resolver invokes the rules policy
- the AdapterProvider framework sets appropriate outbound adapter information
- the message hits the MessageBox
- a send port subscribes to all messages from that specific receive location
- the message is delivered
The receive configuration looks like this:
(full endpoint value is "BRE:\\policy=Microsoft.Practices.ESB.Test;version=;useMsg=;MessageExchangePattern=;")
The send side looks like this (note that there are no values set in the per-instance properties):
Then, of course, we need a filter condition to link them together:
The ultra-complex rules policy :) looks like this:

