I have developed a .NET windows service which polls for a timer interval and fetches data from the database. Then the application, builds some XML file and sends across the xml files to a web service and receives response. The application uses Parallel.Foreach loop to get parallely process all the records fetched from database.
The ParallelOptions object is created and a configurable MaxDegreeOfParallelism is assigned to the object. (The value is set to 5 in app.config).
The application works fine with limited records in database. But the records went to 1000+ and from which I need to read 100 of records and do the parallel processing.(construct the xml file and send to webservice and get response).
Please let me know the best way to get the maximum parallel performance from the above scenario.