How to maintain state or queue of requests in Web API

后端 未结 6 1984
清歌不尽
清歌不尽 2020-12-13 07:39

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

6条回答
  •  借酒劲吻你
    2020-12-13 08:19

    Another solution, could be keeping the records in a memory queue which is not in the same process as WebApi. For example : MemcacheQueue https://github.com/coderrr/memcache_queue

    Some of these queue implementation have capabilities of Persistence and hence you wouldn't loose data in any case.

提交回复
热议问题