{"id":26121527,"url":"https://github.com/fizzed/executors","last_synced_at":"2025-07-11T15:44:12.651Z","repository":{"id":49962812,"uuid":"190202585","full_name":"fizzed/executors","owner":"fizzed","description":"Long-lived tasks and workers on the JVM","archived":false,"fork":false,"pushed_at":"2025-01-22T20:28:59.000Z","size":2092,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T12:51:30.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fizzed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-06-04T13:02:42.000Z","updated_at":"2025-01-22T20:29:02.000Z","dependencies_parsed_at":"2025-04-13T13:01:46.163Z","dependency_job_id":null,"html_url":"https://github.com/fizzed/executors","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/fizzed/executors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzed%2Fexecutors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzed%2Fexecutors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzed%2Fexecutors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzed%2Fexecutors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fizzed","download_url":"https://codeload.github.com/fizzed/executors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzed%2Fexecutors/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264843250,"owners_count":23672154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-10T14:23:36.885Z","updated_at":"2025-07-11T15:44:12.630Z","avatar_url":"https://github.com/fizzed.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Executors by Fizzed\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.fizzed/executors?color=blue\u0026style=flat-square)](https://mvnrepository.com/artifact/com.fizzed/bigmap)\n\n[![Java 8](https://img.shields.io/github/actions/workflow/status/fizzed/executors/java8.yaml?branch=master\u0026label=Java%208\u0026style=flat-square)](https://github.com/fizzed/executors/actions/workflows/java8.yaml)\n[![Java 11](https://img.shields.io/github/actions/workflow/status/fizzed/executors/java11.yaml?branch=master\u0026label=Java%2011\u0026style=flat-square)](https://github.com/fizzed/executors/actions/workflows/java11.yaml)\n[![Java 17](https://img.shields.io/github/actions/workflow/status/fizzed/executors/java17.yaml?branch=master\u0026label=Java%2017\u0026style=flat-square)](https://github.com/fizzed/executors/actions/workflows/java17.yaml)\n[![Java 21](https://img.shields.io/github/actions/workflow/status/fizzed/executors/java21.yaml?branch=master\u0026label=Java%2021\u0026style=flat-square)](https://github.com/fizzed/executors/actions/workflows/java21.yaml)\n\n[![Linux x64](https://img.shields.io/github/actions/workflow/status/fizzed/executors/java11.yaml?branch=master\u0026label=Linux%20x64\u0026style=flat-square)](https://github.com/fizzed/executors/actions/workflows/java11.yaml)\n[![MacOS arm64](https://img.shields.io/github/actions/workflow/status/fizzed/executors/macos-arm64.yaml?branch=master\u0026label=MacOS%20arm64\u0026style=flat-square)](https://github.com/fizzed/executors/actions/workflows/macos-arm64.yaml)\n[![Windows x64](https://img.shields.io/github/actions/workflow/status/fizzed/executors/windows-x64.yaml?branch=master\u0026label=Windows%20x64\u0026style=flat-square)](https://github.com/fizzed/executors/actions/workflows/windows-x64.yaml)\n\n[Fizzed, Inc.](http://fizzed.com) (Follow on Twitter: [@fizzed_inc](http://twitter.com/fizzed_inc))\n\nExecutors by Fizzed helps you build, manage, and operate long-lived workers (threads)\non the JVM.\n\nJava's standard ExecutorService and its various implementations (correctly) hide where\nand how your Runnable is executing.  They are designed to abstract the run() method.\n\nHowever, when building long-lived tasks, where some parts of your code are critical\nto not be interrupted (e.g. during a graceful shutdown). That's where the lack of\ncontext within your run() of how you're executing becomes a problem.  This usually\nconsists of waiting for work and being able to prevent shutdown until that work is\ncompleted.\n\nThis framework is a simple layer built on top of the ExecutorService to give your\nWorkers the context and building blocks for rock-solid long-lived tasks.\n\n\nPattern 1: poll and accept next job (e.g. Blocking Queue)\n\n    while (!stopped) {\n        job = pollAndAcceptNextJob()   // \u003c-- critical start\n\n\tif (job) {\n            // handle job\n\t}\t\t\t       // \u003c-- critical end\n\n        sleep(2 seconds)               // \u003c-- interrupt ok\n    }\n\n\nPattern 2: poll then accept next job (e.g. JMS w/ manual ack)\n\n    while (!stopped) {\n        job = pollNextJob()            // \u003c-- interrupt ok\n\n        if (job) {\n\t    // accept job (ack it)     // \u003c-- critical start\n            // handle job\n        }                              // \u003c-- critical end\n\n        sleep(2 seconds)               // \u003c-- interrupt ok\n    }\n\n## Usage\n\nIn your `pom.xml` add the following dependency:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.fizzed\u003c/groupId\u003e\n  \u003cartifactId\u003eexecutors-core\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.5\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## License\n\nCopyright (C) 2025 Fizzed, Inc.\n\nThis work is licensed under the Apache License, Version 2.0. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizzed%2Fexecutors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffizzed%2Fexecutors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizzed%2Fexecutors/lists"}