//todo abstract this behind a "output forwarder" void MessageReceivedOnChannel(object sender, MessageForwardingArgs e) { var messageToSend = e.Message; string routeTo = Headers.RouteTo.Replace(HeaderMapper.NServiceBus + Headers.HeaderName + ".", ""); var destination = DefaultDestinationAddress; if (messageToSend.Headers.ContainsKey(routeTo)) { destination = messageToSend.Headers[routeTo]; } Logger.Info("Sending message to " + destination); messageSender.Send(messageToSend, destination); }
void httpChannel_MessageReceived(object sender, MessageForwardingArgs e) { transportMessage = e.Message; messageReceived.Set(); }
void httpChannel_MessageReceived(object sender, MessageForwardingArgs e) { transportMessage = e.Message; messageReceived.Set(); }