Reply Messages over same binding
Status: Pre-Alpha
Brought to you by:
patforna
Currently, reply messages from a service are sent back over the same binding that the incoming message (with the replyTo header set) used.
It would not be a big deal to change the following line to some other user-provided binding address:
client.ReplyTo = SsdlEndpoints[0].Address;
However, because we haven't had a use case for this, we haven't implemented it.
Logged In: YES
user_id=867752
Originator: YES
The above comment is wrong.
For messages that start a conversation, it only affects the ReplyTo address. However, it might still be desirable to set that ReplyTo address to something else than the first Endpoint Address.
For other messages, i.e. messages that occur in the middle of a conversation, we reply over the same bining that the message came in, so it's this bit of code here that we would need to change:
EndpointAddress localAddress = octx.Channel.LocalAddress;
Binding binding = null;
foreach (ServiceEndpoint se in octx.Host.Description.Endpoints) {
if (se.Address == localAddress) {
binding = se.Binding;
break;
}
}