Ok let me have another shot at explaining this...I need some sort of response as I have spent many hours trying to figure it out with no luck!!!
1. I have a schema defined as an envelope.
2. I have created a custom receive pipeline with a custom XmlDissasembler component in the Dissasemble stage that inspects the xml message (an attrubute of the root node) and promotes this value into a custom property into each debatched message inside the
3. I then have a ESBItinerary and ESBDispatcher component in the Resolve Party stage.
4. In the ESBItinerary component I have a BRE.EXT policy and several rules based on the ESBMessageContext property and the promoted property from 2. I then set the ItineraryName based on these rules.
5. A one-way receive port and a file receive location that uses this pipeline (above)
6. All the itineraries are one-way and invloke a dynamic one-way send port. OnRamp > Messaging Service (map) > OffRampExtender > OffRamp
7. One-way dynamic send port with an ItinerarySend Pipeline.
Ok so far so good. Dropping a message with lets say 3 messages for debatching creates 3 biztalk messages and each uses the correct itinerary. Lets say for this example each debatched message is of Type X and has a promoted property of Y. According to the
rule this would evaluate to Itinerary A - and it does and everything works as expected. This makes sense to me because the ESBItinerary and ESBDispatcher components are in the ResolveParty Stage after the Dissasemble stage where the original message is debatched.
Now....If I change the message so each debatched message is of Type X and has a promoted property of Z. According to the rule this would evaluate to Itinerary B - but NO Itinerary A is still used for all 3 messages. The only way to fix this is to restart
the host instance.
Something is cached (confirmed using debugView) and I dont know why. It is important that I have only one receive location (using the BRE to evaluate the itinerary to use). Each message coming to the RL is of this envelope schema instance so that is why
I only have one RL.
I have tried modifying timeout values in the esb.config file as well as the itinerarySend Itinerary cache component in the Send Port with no luck - although as I understand it this component is only used in 2-way ports.