void TransportStartedMessageProcessing(object sender, StartedMessageProcessingEventArgs e) { var incomingMessage = e.Message; incomingMessage.Headers[Headers.HostId] = HostInformation.HostId.ToString("N"); incomingMessage.Headers[Headers.HostDisplayName] = HostInformation.DisplayName; PipelineFactory.PreparePhysicalMessagePipelineContext(incomingMessage); }
void TransportOnStartedMessageProcessing(object sender, StartedMessageProcessingEventArgs e) { //if there was a failure this "send" will be rolled back string messageSessionId; e.Message.Headers.TryGetValue(Headers.WorkerSessionId, out messageSessionId); //If the message we are processing contains an old sessionid then we do not send an extra control message //otherwise that would cause https://github.com/Particular/NServiceBus/issues/978 if (messageSessionId == workerSessionId) { SendReadyMessage(messageSessionId); } }
void TransportOnStartedMessageProcessing(object sender, StartedMessageProcessingEventArgs e) { //if there was a failure this "send" will be rolled back string messageSessionId; e.Message.Headers.TryGetValue(Headers.WorkerSessionId, out messageSessionId); //If the message we are processing contains an old sessionid then we do not send an extra control message //otherwise that would cause https://github.com/Particular/NServiceBus/issues/978 if (messageSessionId == workerSessionId) { SendReadyMessage(messageSessionId); } }
void TransportStartedMessageProcessing(object sender, StartedMessageProcessingEventArgs e) { _messageBeingHandled = e.Message; AddProcessingInformationHeaders(_messageBeingHandled); #pragma warning disable 0618 modules = Builder.BuildAll <IMessageModule>().ToList(); #pragma warning restore 0618 modules.ForEach(module => { Log.Debug("Calling 'HandleBeginMessage' on " + module.GetType().FullName); module.HandleBeginMessage(); //don't need to call others if one fails }); modules.Reverse();//make sure that the modules are called in reverse order when processing ends }
void TransportStartedMessageProcessing(object sender, StartedMessageProcessingEventArgs e) { var incomingMessage = e.Message; incomingMessage.Headers[Headers.ProcessingEndpoint] = Configure.EndpointName; incomingMessage.Headers[Headers.HostId] = HostInformation.HostId.ToString("N"); incomingMessage.Headers[Headers.HostDisplayName] = HostInformation.DisplayName; AddBackwardsCompatibilityHeaders(incomingMessage); PipelineFactory.PreparePhysicalMessagePipelineContext(incomingMessage, messageHandlingDisabled); #pragma warning disable 0618 modules = Builder.BuildAll <IMessageModule>().ToList(); #pragma warning restore 0618 modules.ForEach(module => { Log.Debug("Calling 'HandleBeginMessage' on " + module.GetType().FullName); module.HandleBeginMessage(); //don't need to call others if one fails }); modules.Reverse();//make sure that the modules are called in reverse order when processing ends }
void transport_StartedMessageProcessing(object sender, StartedMessageProcessingEventArgs e) { context.StartMessageProcessingCalled = true; }