A simple in-memory job queue for Go with worker-based dispatching and cron scheduling.
Artifex is a simple in-memory job queue library for Go that facilitates asynchronous task execution using a worker-based dispatching model. It allows developers to queue and schedule jobs for background processing, supporting immediate, delayed, periodic, and cron-based execution. The library solves the need for lightweight, concurrent job management without relying on external message brokers or complex infrastructure.
Go developers building applications that require background job processing, such as web servers handling async tasks, scheduled maintenance jobs, or periodic data processing. It's particularly suited for projects needing a simple, self-contained job queue without external dependencies.
Developers choose Artifex for its minimalistic design, ease of integration, and straightforward API that reduces the complexity of implementing job queues in Go. Its in-memory nature and built-in support for cron scheduling via the robfig/cron library provide a reliable alternative to heavier solutions like Redis or message brokers for many use cases.
Simple in-memory job queue for Golang using worker-based dispatching
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Relies only on standard Go libraries and the robfig/cron library for cron scheduling, keeping the library lightweight and easy to integrate without external systems.
Supports immediate, delayed, periodic, and cron-based job dispatch via methods like Dispatch, DispatchIn, DispatchEvery, and DispatchCron, as shown in the README example code.
Offers a straightforward API with intuitive methods such as NewDispatcher, Start, and various Dispatch functions, requiring minimal boilerplate for common job queue tasks.
Allows setting the number of workers and maximum queue size during initialization, providing control over resource usage and throughput for background processing.
Jobs are stored in memory, so all queued and scheduled jobs are lost if the application crashes or restarts, making it unreliable for critical tasks.
Lacks common job queue functionalities like automatic retry mechanisms, job prioritization, and detailed logging or monitoring tools, which are essential for complex workflows.
Being in-memory, it cannot distribute jobs across multiple application instances, restricting its use in horizontally scaled or high-availability deployments.