{"id":19446269,"url":"https://github.com/SkillPanel/duramen","last_synced_at":"2026-01-11T17:58:33.898Z","repository":{"id":15446803,"uuid":"18179667","full_name":"Devskiller/duramen","owner":"Devskiller","description":"Java persistent event bus","archived":false,"fork":false,"pushed_at":"2018-10-29T23:33:32.000Z","size":338,"stargazers_count":46,"open_issues_count":2,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-18T01:17:13.852Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Devskiller.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}},"created_at":"2014-03-27T14:56:52.000Z","updated_at":"2023-07-19T05:10:13.000Z","dependencies_parsed_at":"2022-09-09T03:01:33.760Z","dependency_job_id":null,"html_url":"https://github.com/Devskiller/duramen","commit_stats":null,"previous_names":["codearte/duramen"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Devskiller/duramen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devskiller%2Fduramen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devskiller%2Fduramen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devskiller%2Fduramen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devskiller%2Fduramen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devskiller","download_url":"https://codeload.github.com/Devskiller/duramen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devskiller%2Fduramen/sbom","scorecard":{"id":31595,"data":{"date":"2025-08-11","repo":{"name":"github.com/Devskiller/duramen","commit":"d4503e425a04e1a70741a6675e29b6b44c2fbcb2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: .mvn/wrapper/maven-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"109 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h46c-h94j-95f3","Warn: Project is vulnerable to: GHSA-wf8f-6423-gfxg","Warn: Project is vulnerable to: GHSA-27xj-rqx5-2255","Warn: Project is vulnerable to: GHSA-288c-cq4h-88gq","Warn: Project is vulnerable to: GHSA-4w82-r329-3q67","Warn: Project is vulnerable to: GHSA-57j2-w4cx-62h2","Warn: Project is vulnerable to: GHSA-58pp-9c76-5625","Warn: Project is vulnerable to: GHSA-5949-rw7g-wx7w","Warn: Project is vulnerable to: GHSA-5p34-5m6p-p58g","Warn: Project is vulnerable to: GHSA-5r5r-6hpj-8gg9","Warn: Project is vulnerable to: GHSA-5ww9-j83m-q7qx","Warn: Project is vulnerable to: GHSA-6fpp-rgj9-8rwc","Warn: Project is vulnerable to: GHSA-758m-v56v-grj4","Warn: Project is vulnerable to: GHSA-85cw-hj65-qqv9","Warn: Project is vulnerable to: GHSA-89qr-369f-5m5x","Warn: Project is vulnerable to: GHSA-8c4j-34r4-xr8g","Warn: Project is vulnerable to: GHSA-8w26-6f25-cm9x","Warn: Project is vulnerable to: GHSA-95cm-88f5-f2c7","Warn: Project is vulnerable to: GHSA-9gph-22xh-8x98","Warn: Project is vulnerable to: GHSA-9m6f-7xcq-8vf8","Warn: Project is vulnerable to: GHSA-9vvp-fxw6-jcxr","Warn: Project is vulnerable to: GHSA-c265-37vj-cwcc","Warn: Project is vulnerable to: GHSA-c2q3-4qrh-fm48","Warn: Project is vulnerable to: GHSA-c8hm-7hpq-7jhg","Warn: Project is vulnerable to: GHSA-cf6r-3wgc-h863","Warn: Project is vulnerable to: GHSA-cmfg-87vq-g5g4","Warn: Project is vulnerable to: GHSA-cvm9-fjm9-3572","Warn: Project is vulnerable to: GHSA-f3j5-rmmp-3fc5","Warn: Project is vulnerable to: GHSA-f9hv-mg5h-xcw9","Warn: Project is vulnerable to: GHSA-f9xh-2qgp-cq57","Warn: Project is vulnerable to: GHSA-fmmc-742q-jg75","Warn: Project is vulnerable to: GHSA-fqwf-pjwf-7vqv","Warn: Project is vulnerable to: GHSA-gjmw-vf9h-g25v","Warn: Project is vulnerable to: GHSA-gwp4-hfv6-p7hw","Warn: Project is vulnerable to: GHSA-gww7-p5w4-wrfv","Warn: Project is vulnerable to: GHSA-h3cw-g4mq-c5x2","Warn: Project is vulnerable to: GHSA-h4rc-386g-6m85","Warn: Project is vulnerable to: GHSA-h822-r4r5-v8jg","Warn: Project is vulnerable to: GHSA-j823-4qch-3rgm","Warn: Project is vulnerable to: GHSA-jjjh-jjxp-wpff","Warn: Project is vulnerable to: GHSA-m6x4-97wx-4q27","Warn: Project is vulnerable to: GHSA-mc6h-4qgp-37qh","Warn: Project is vulnerable to: GHSA-mph4-vhrx-mv67","Warn: Project is vulnerable to: GHSA-mx7p-6679-8g3q","Warn: Project is vulnerable to: GHSA-mx9v-gmh4-mgqw","Warn: Project is vulnerable to: GHSA-p43x-xfjf-5jhr","Warn: Project is vulnerable to: GHSA-q93h-jc49-78gg","Warn: Project is vulnerable to: GHSA-qjw2-hr98-qgfh","Warn: Project is vulnerable to: GHSA-qmqc-x3r4-6v39","Warn: Project is vulnerable to: GHSA-r3gr-cxrf-hg25","Warn: Project is vulnerable to: GHSA-r695-7vr9-jgc2","Warn: Project is vulnerable to: GHSA-rf6r-2c4q-2vwg","Warn: Project is vulnerable to: GHSA-rgv9-q543-rqg4","Warn: Project is vulnerable to: GHSA-rpr3-cw39-3pxh","Warn: Project is vulnerable to: GHSA-v3xw-c963-f5hc","Warn: Project is vulnerable to: GHSA-v585-23hc-c647","Warn: Project is vulnerable to: GHSA-vfqx-33qm-g869","Warn: Project is vulnerable to: GHSA-wh8g-3j2c-rqj5","Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-2p3x-qw9c-25hh","Warn: Project is vulnerable to: GHSA-2q8x-2p7f-574v","Warn: Project is vulnerable to: GHSA-3ccq-5vw3-2p6x","Warn: Project is vulnerable to: GHSA-43gc-mjxg-gvrq","Warn: Project is vulnerable to: GHSA-4cch-wxpw-8p28","Warn: Project is vulnerable to: GHSA-4hrm-m67v-5cxr","Warn: Project is vulnerable to: GHSA-56p8-3fh9-4cvq","Warn: Project is vulnerable to: GHSA-59jw-jqf4-3wq3","Warn: Project is vulnerable to: GHSA-64xx-cq4q-mf44","Warn: Project is vulnerable to: GHSA-6w62-hx7r-mw68","Warn: Project is vulnerable to: GHSA-6wf9-jmg9-vxcc","Warn: Project is vulnerable to: GHSA-74cv-f58x-f9wf","Warn: Project is vulnerable to: GHSA-7chv-rrw6-w6fc","Warn: Project is vulnerable to: GHSA-7hwc-46rm-65jh","Warn: Project is vulnerable to: GHSA-8jrj-525p-826v","Warn: Project is vulnerable to: GHSA-cxfm-5m4g-x7xp","Warn: Project is vulnerable to: GHSA-f6hm-88x3-mfjv","Warn: Project is vulnerable to: GHSA-f8cc-g7j8-xxpm","Warn: Project is vulnerable to: GHSA-g5w6-mrj7-75h2","Warn: Project is vulnerable to: GHSA-h7v4-7xg3-hxcc","Warn: Project is vulnerable to: GHSA-hf23-9pf7-388p","Warn: Project is vulnerable to: GHSA-hfq9-hggm-c56q","Warn: Project is vulnerable to: GHSA-hph2-m3g5-xxv4","Warn: Project is vulnerable to: GHSA-hrcp-8f3q-4w2c","Warn: Project is vulnerable to: GHSA-hvv8-336g-rx3m","Warn: Project is vulnerable to: GHSA-hwpc-8xqv-jvj4","Warn: Project is vulnerable to: GHSA-j563-grx4-pjpv","Warn: Project is vulnerable to: GHSA-j9h8-phrw-h4fh","Warn: Project is vulnerable to: GHSA-jfvx-7wrx-43fh","Warn: Project is vulnerable to: GHSA-mw36-7c6c-q4q2","Warn: Project is vulnerable to: GHSA-p8pq-r894-fm8f","Warn: Project is vulnerable to: GHSA-qpfq-ph7r-qv6f","Warn: Project is vulnerable to: GHSA-qrx8-8545-4wg2","Warn: Project is vulnerable to: GHSA-rmr5-cpv2-vgjf","Warn: Project is vulnerable to: GHSA-xw4p-crpj-vjx2","Warn: Project is vulnerable to: GHSA-56h3-78gp-v83r","Warn: Project is vulnerable to: GHSA-7rf3-mqpx-h7xg","Warn: Project is vulnerable to: GHSA-grr4-wv38-f68w","Warn: Project is vulnerable to: GHSA-q6g2-g7f3-rr83","Warn: Project is vulnerable to: GHSA-x27m-9w8j-5vcw","Warn: Project is vulnerable to: GHSA-36p3-wjmg-h94x","Warn: Project is vulnerable to: GHSA-hh26-6xwr-ggv7","Warn: Project is vulnerable to: GHSA-4gc7-5j7h-4qph","Warn: Project is vulnerable to: GHSA-4wp7-92pw-q264","Warn: Project is vulnerable to: GHSA-g5mm-vmx4-3rg7","Warn: Project is vulnerable to: GHSA-558x-2xjg-6232","Warn: Project is vulnerable to: GHSA-564r-hj7v-mcr5","Warn: Project is vulnerable to: GHSA-9cmq-m9j5-mvww","Warn: Project is vulnerable to: GHSA-wxqc-pxw9-g2p8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T19:14:32.382Z","repository_id":15446803,"created_at":"2025-08-14T19:14:32.382Z","updated_at":"2025-08-14T19:14:32.382Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278909712,"owners_count":26066887,"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-08T02:00:06.501Z","response_time":56,"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":[],"created_at":"2024-11-10T16:13:22.328Z","updated_at":"2026-01-11T17:58:33.858Z","avatar_url":"https://github.com/Devskiller.png","language":"Java","funding_links":[],"categories":["进程间通信"],"sub_categories":["Spring Cloud框架"],"readme":"# Duramen [![Build Status](https://travis-ci.org/Devskiller/duramen.svg?branch=master)](https://travis-ci.org/Devskiller/duramen) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.devskiller.duramen/duramen/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.devskiller.duramen/duramen)\n\nPersistent event bus implementation for Java. Easily integrates with Spring Framework. By default uses file backed database. Guarantees that event will be dispatched.\n\n## Usage\n\n1) Add Duramen dependency:\n  `com.devskiller.duramen:duramen:1.1.2`\n\n2) Use ```@EnableDuramen``` annotation to import Duramen into your project:\n```java\n@Configuration\n@ComponentScan\n@EnableDuramen\npublic class FooConfiguration {\n \n}\n```\n\n3) Implement custom event class. Remember that this class must contain (even private) default constructor\n```java\npublic class FooEvent implements Event {\n\tprivate String message;\n \n\t// getters and setters\n}\n```\n\n4) To produce events you have to implement producer component:\n```java\nimport io.codearte.duramen.EventBus;\n \n@Component\npublic class FooEventProducer {\n\n\tprivate final EventBus eventBus;\n  \n\t@Autowired\n\tpublic FooEventProducer(EventBus eventBus) {\n\t\tthis.eventBus = eventBus;\n\t}\n\n\t/** \n\t * You will invoke this method somewhere in your code\n\t */\n\tpublic void produceEvent() {\n\t\tFooEvent event = new FooEvent();\n\t\tevent.setMessage(\"Test message\");\n\t\teventBus.publish(event);\n\t}\n}\n```\n\n5) To receive events you have to implement consumer. Generic type in ```EventHandler``` will decide which events will be processed in particular consumer:\n```java\nimport io.codearte.duramen.handler.EventHandler;\n\n@Component\npublic class FooEventConsumer implements EventHandler\u003cFooEvent\u003e {\n\n\t@Override\n\tpublic void onEvent(FooEvent event) {\n\t\tSystem.out.println(\"Received message: \" + event.getMessage());\n\t}\n\n}\n```\n\nAll Spring beans implementing ```EventHandler``` interface will be automatically registered as handlers. It's also possible to manually register ```EventHandler``` by invoking ```eventBus.register(qualifiedEventClassName, eventHandler)``` method.\n\n6) If you want to retry events after some error occur you just have to implement ```RetryableEvent``` instead of ```Event```\n\n7) If you want to use transaction-aware events just please annotate ```Event``` classes with `@ProcessAfterCommit`. As the name suggests such events will be processed after committing the transaction.\n\n## Testing\n\nUsually in test scope we don't want to persist our events. To achieve such behaviour we can configure custom bean:\n```java\nimport io.codearte.duramen.datastore.InMemory();\n \n@Bean\npublic Datastore inMemoryDatastore() {\n\treturn new InMemory();\n}\n```\n\n## Error handling\n\nWhen ```EventHandler``` processing bean throws an exception, it will be logged with event data serialized to JSON.\n\nYou can specify custom ```ExceptionHandler``` by creating bean implementing ```io.codearte.duramen.handler.ExceptionHandler``` interface.\n\n## Available datastores\n\nIn Duramen there are 2 ```Datastore``` objects.\n\n### FileData\n\nDefault implementation. Backed by [Chronicle Map](https://github.com/OpenHFT/Chronicle-Map). It stores events in binary file (by default duramen.data).\nTo use this implementation you don't have to do anything, as long as you accept default values (see \"Specifying messages limits\").\nTo change defaults you need create own bean:\n\n```java\nimport io.codearte.duramen.datastore.FileData;\n \n@Bean\npublic Datastore fileDatastore() {\n\treturn new FileData(\"/tmp/myfile.data\", /*entries*/ 10, /*entrySize*/ 8192);\n}\n```\n\n### In memory\n\nWe've already described ```InMemory``` datastore in \"Testing\" section\n\n## Customizing default configuration\n\nAs you can see to use Duramen no configuration is required. However if you want, there are some options to customize.\nTo do that just provide ```DuramenConfiguration``` bean:\n\n```java\n@Bean\npublic DuramenConfiguration duramenConfiguration() {\n\treturn DuramenConfiguration.builder().retryDelayInSeconds(30).build()\n}\n```\n\n### Specifying messages limits\n\nBy default message size is set to 4096 bytes. You can change this value by defining bean:\n\n```java\nDuramenConfiguration.builder().maxMessageSize(8192).build()\n```\n\nMessage count limit is set to 1024 events in queue. You can change this value by defining bean:\n\n```java\nDuramenConfiguration.builder().maxMessageCount(2048).build()\n}\n```\n\n### Retrying options\n\nBy default Duramen reties all ```RetryableEvent``` events after any exception 3 times with 5 seconds delay. Of course you can customize\nthose settings by ```DuramenConfiguration```:\n\n```java\nDuramenConfiguration.builder().retryDelayInSeconds(5).retryCount(10)\n\t\t.retryableExceptions(SocketTimeoutException.class).build()\n```\n\n### Processing options\n\nBy default Duramen uses daemon threads, but it can be easily changes by declaring:\n\n```java\nDuramenConfiguration.builder().useDaemonThreads(false).build()\n```\n\nAlso number of threads processing events (default we use only one thread) can be increased:\n\n```java\nDuramenConfiguration.builder().maxProcessingThreads(2).build()\n```\n\nFinally, if you want, there is a possibility to use own ExecutorService for processing events.\n```java\n@Bean\npublic ExecutorService duramenExecutorService() {\n\treturn Executors.newCachedThreadPool();\n}\n```\n\n## Performance\n\nPerformance tests executed using JMH on Linux-4.12.5, Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz\n\n| Datastore | Event type* | Events / second |\n| --------- |-------------| ---------------:|\n| Filedata  | Simple      |         943 431 |\n| Filedata  | Complex     |         326 803 |\n| InMemory  | Simple      |       1 494 560 |\n| InMemory  | Complex     |         384 291 |\n\n- Simple event contains one short String field\n- Complex event contains 512 chars String field, one BigDecimal field and 6 element ArrayList of Integers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSkillPanel%2Fduramen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSkillPanel%2Fduramen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSkillPanel%2Fduramen/lists"}