Returning null from a Pipeline

In my previous Blog entry titled Accessing Promoted Properties in a Pipeline Component I talked about sending data to a pipeline in order to insert the data into a database.  Once that data was sent to the database I ended up passing the entire incoming message back to the BizTalk engine so that BizTalk could finish its processing. 

 

In that scenario, from a requirements perspective, I really didn't need to send anything back; my processing was finished.  So what I could have done is to process the incoming message in the manner that I needed to and then delete the message.  In other words, one message comes into my pipeline but none will go out.  In order to do this I just need to return null from either the IComponent.Execute, IDisassemblerComponent.GetNext or IAssemblerComponent.Assemble methods.

 

This would look like the following:

 

public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)

{

//do some work with the message

 

return null;

}