Via on Demand
How do I specify a delivery address for messages from a proxy that are different from the service address?
Two different addresses are sometimes both referred to as the address for sending messages. There is a logical address, called the To address, that is the address that identifies the service. There is a physical address, called the Via address, that is the address that identifies where the service is located. The two addresses can be independently specified but when there is only a single address specified it is typically understood that the two addresses are the same.
You’ll see this split of addresses continue throughout the object model from services down to channels. Thus, if you’re just constructing your own proxy objects, you could simply specify the two addresses directly.
However, in other cases you’re relying on a client description to specify the characteristics of the proxy. In that case you can use a ClientViaBehavior on the client endpoint configuration to set a target URI for the Via address. The Via address for the ClientViaBehavior is transferred to the client runtime and causes any proxy built using that client description for which a Via address is not explicitly specified to use this default value. If you don’t explicitly specify a Via and you haven’t set a default Via address, then you’ll get the To address reused for the Via.