biztalkbiztalk-2016biztalk-wcf

Disable/block BizTalk WCF Send Port during high volume


I have a non critical/optional WCF Send Port that is useful during normal operations but needs to automatically disable at a certain throughput of messages. This high volume occurs when connected systems perform data loads (100 000 msgs per hour or more). The messages from the high volume time should not be kept or processed, just dropped completely. The Send port should resume processing/sending message once the volume drops below a threshold level. The application does not use orchestrations. My only idea so far is to track throughput using a custom pipeline component and something like redis, then either drop or send the message based on this. This seems like a not so good hack.

My question is: Using a WCF Adapter (or something else) is there an easy way to either drop a message or send it based on the current message throughput?


Solution

  • What I usually do in this sort of scenario is to have the incoming messages be saved to a database table and then have a receive location that polls that table to process the messages. So you could have a stored procedure that is called by that polling receive location, that if there are too many message pending, delete them. This approach also works if you get a burst of messages that you do want to process all of them, or if you want to batch them to send.

    Note: Don't set Poll while messages found = True in this scenario.