As in the above picture, BizTalk architecture is clearly showing how pub-sub architecture works but I am also going to describe it in easy descriptive way.




Firstly once messages are available any format likes in well-formatted XML or file with the assistance of any adapter protocol like SFTP, File etc. In receive port and if message format is flat-file then we need to a receive pipeline to convert it in XML because BizTalk only communicate a message in XML

At this stage, XML message is not inserted in BizTalk message box database because of its need at least one subscriber but still only the message is published at receiving port and when we create a send port with the route a message with filter condition of its message context property or create a orchestration then create first active receive shape for receive port and then logical subscribers send port then whole XML message insert in BizTalk message box database and move message further as design orchestration business flow.

We can also create business rules separately and call it in BizTalk orchestration as per our requirement then send either in XML messages or add send pipeline at sending port for flat messages.

So in this way Biztalk pub-sub architecture works to complete a business process.