Issue: In multi-server BizTalk environment, BizTalk WCF-Custom (SQL Binding) Receive Locations poll SQL Server more than one times instead of single polling.
Normally in multi-server BizTalk environment, we are creating host instances for each host on each BizTalk server. But BizTalk has little limitation for active/active multi-server setup.
Below are adapters which only work on single server host instance.
- WCF-SQL (Receive Adapter)
Normally we get information on internet search about FTP and POP3 adapters for single server and forgot about mention about WCF-SQL Receive adapter. So when we deploy code on multi-server environment then we face multiple polling from WCF-SQL Receive location.
Reason: We have created two Host Instances for Host for Both BizTalk Servers and apply that host on Receive Location which is polling to Database. So both Host instances are polling data from SQL that’s why BizTalk receive two time data.
If we apply multiple host instances on these adapters for Receive Location then every host instance will run and process data into BizTalk.
For more details you can refer to below link:
We can apply one of three approaches to resolve this issue. Below 2nd is mostly used in BizTalk development scenario.
- Create a Single Server Host Instance as Receive Handler for WCF-Custom (SQL) Receive Location
- In SQL, update Stored Procedure with lock for processing data and update the flag not to send any data 2nd time call until unless data is modified.
- Create Host Instance cluster which run on both machine. It will run as active/passive mode. If one server will unavailable then start polling with other server.
Below is link for setup for cluster Host Instances