I have situation, where I have to receive requests in a Web API method, queue those request and then send the bulk to a database (Solr instance).
I am not really su
you should try to implement NServiceBus have the ability to schedule messages and send messages in the future, from the service bus documentation you can scheduling capability you can schedule a task or an action/lambda, to be executed repeatedly in a given interval.
that means that you can have a memeory cache and write the content of the array into your solr/lucene impl every 10 minutes for example, thats something as easier as:
Schedule.Every(TimeSpan.FromMinutes(10)).Action(() => { < task to be executed > })
In the case that you will need more flexibility for setting a schedueler you can integrate it quartz.net
the case should be the following:
ServiceBus will handle to manage the queues for the operations into the array and avoid any collisions for the array operations for example: