I am using a concurrent queue in my Web API as mentioned in thread How to maintain state or queue of requests in Web API
But I am running into an issue where if the application pool is stopped or recycled it looses all the data in the memory. Can someone help me as to how I can handle the same?
My use case requires accepting messages from different origins and putting in the queue and after every 5 seconds interval i am writing those messages to an input .txt file.