private void InterceptMessage(T message) { Interceptor <T> intercepter = null; try { intercepter = InterceptorFactory.GetInterceptor(message); T forward = intercepter.OnSend(message); // NOTE that if the output channel is not a synchronous channel, the intercepter will not // control the context of that channel and the processing of the message _output.Send(forward); intercepter.OnComplete(); } catch (Exception ex) { if (intercepter != null) { intercepter.OnException(ex); } throw; } }