{"id":23650009,"url":"https://github.com/jensborch/bel","last_synced_at":"2025-10-29T12:16:07.893Z","repository":{"id":73720902,"uuid":"100385603","full_name":"jensborch/bel","owner":"jensborch","description":"Back-off executor library","archived":false,"fork":false,"pushed_at":"2017-10-27T12:19:25.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-18T17:37:31.488Z","etag":null,"topics":["cdi","javaee","resilience"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jensborch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-08-15T14:26:07.000Z","updated_at":"2017-10-27T15:09:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7ec2ec3-b7de-42c8-9b38-bfa2c3c87b6d","html_url":"https://github.com/jensborch/bel","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jensborch/bel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jensborch%2Fbel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jensborch%2Fbel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jensborch%2Fbel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jensborch%2Fbel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jensborch","download_url":"https://codeload.github.com/jensborch/bel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jensborch%2Fbel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013695,"owners_count":26085390,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cdi","javaee","resilience"],"created_at":"2024-12-28T15:50:19.271Z","updated_at":"2025-10-13T05:12:29.625Z","avatar_url":"https://github.com/jensborch.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BEL - Minimalistic Java EE executor library with back-off\n\nThis library provides a CDI injectable resilient executor with a configurable back-off. The executor simplifies calling potentially fragile services without overloading them, as it will\t retry code execution based on a back-off strategy.\n\nThis library implements an [Executor](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html) as a simple wrapper around the Java EE [ManagedScheduledExecutorService](http://docs.oracle.com/javaee/7/api/javax/enterprise/concurrent/ManagedScheduledExecutorService.html). The Executor is a dependent CDI bean and will thus be instantiated in the same scope as the bean it is injected into.\n\nThe resilient executor will automatically start a new transaction when executing code using ManagedScheduledExecutorService, further simplifying creating resilient asynchronous code.\n\n# Status\n\nModule is considered beta quality.\n\n[![Build Status](https://travis-ci.org/Nykredit/bel.svg?branch=master)](https://travis-ci.org/Nykredit/bel) [![Coverage Status](https://coveralls.io/repos/github/Nykredit/bel/badge.svg?branch=master)](https://coveralls.io/github/Nykredit/bel?branch=master)\n\n# Usage\n\nAdd the following Maven dependency to your project:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003edk.nykredit.resilience\u003c/groupId\u003e\n    \u003cartifactId\u003ebel\u003c/artifactId\u003e\n    \u003cversion\u003e0.9.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nThe resilient executor implements the Executor interface and using the executor is thus similar to using Java EE ManagedScheduledExecutorService:\n\n```java\n@Inject\n@Resilient(strategy = PolynomialBackoffStrategy.class)\n@PolynomialBackoffStrategyConfig(delay = 1, maxDelay = 1800, retries = 100, timeUnit = TimeUnit.SECONDS)\nprivate ResilientExecutor executor;\n\nexecutor.execute(() -\u003e {\n        Customer customer = repository.get(id);\n        StatusRepresentation status = statusConnector.get(customer.getId());\n        customer.setStatus(status.getStatus());\n    }, e -\u003e {\n        LOGGER.error(\"Error calling service...\", e);\n        Customer customer = repository.get(id);\n        customer.setStatus(Status.UNKNOWN);\n    });\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjensborch%2Fbel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjensborch%2Fbel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjensborch%2Fbel/lists"}