Redis支持的任務隊列延遲作業處理:punctual
基于Redis的任務隊列,輪詢和處理機制。用于延遲作業處理。設計為輕量級和高度可定制的,這個包提供了一個任務隊列和輪詢機制,以及從中繼承基本任務相關的對象。
它通過Redis代替專門的MQ來管理非本地持久性。這降低了在堆棧中的復雜性,因為Redis已經是一個用于臨時存儲和緩存常用組件。
有什么不同
Internally works a bit like kue, storing scheduled tasks as sorted-set (ZSET) members and individual hashes. Unlike kue, however, it:
- distinguishes TaskRunners - TaskRunner prototypes can be programmed to handle & process specific task types
- does not implement a REST API, instead exposing a DAO where methods can be called imperatively
- does not use 'priority' in task execution, instead using raw timestamps to determine what tasks to run when (stored as ZSET scores)
- does not leave any ghost tasks in Redis, using EXPIREAT to expire task keys
- does not require a callback, task execution can be fire-and-forget and errors/info received through event subscribers
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!