{"id":37020481,"url":"https://github.com/dathoangse/java-cqrs-commandbus","last_synced_at":"2026-01-14T02:22:49.579Z","repository":{"id":54181351,"uuid":"170154005","full_name":"dathoangse/java-cqrs-commandbus","owner":"dathoangse","description":"A lightweight \u0026 highly extensible CQRS Command Bus for implementing application services and CQRS architectural pattern in Java","archived":false,"fork":false,"pushed_at":"2023-03-03T06:49:25.000Z","size":236,"stargazers_count":21,"open_issues_count":8,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-07-07T20:08:33.000Z","etag":null,"topics":["architecture","command-bus","cqrs-architectural-pattern","cross-cutting-concerns","java","middleware"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dathoangse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-11T15:37:47.000Z","updated_at":"2023-03-03T06:49:32.000Z","dependencies_parsed_at":"2022-08-13T08:31:19.666Z","dependency_job_id":null,"html_url":"https://github.com/dathoangse/java-cqrs-commandbus","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"purl":"pkg:github/dathoangse/java-cqrs-commandbus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dathoangse%2Fjava-cqrs-commandbus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dathoangse%2Fjava-cqrs-commandbus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dathoangse%2Fjava-cqrs-commandbus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dathoangse%2Fjava-cqrs-commandbus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dathoangse","download_url":"https://codeload.github.com/dathoangse/java-cqrs-commandbus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dathoangse%2Fjava-cqrs-commandbus/sbom","scorecard":{"id":325020,"data":{"date":"2025-08-11","repo":{"name":"github.com/dathoangse/java-cqrs-commandbus","commit":"6a81efff30974ea09e536d234a22425651281ae0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"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":"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":"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":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-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":"Code-Review","score":0,"reason":"Found 1/18 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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 19 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"}}]},"last_synced_at":"2025-08-18T02:13:13.263Z","repository_id":54181351,"created_at":"2025-08-18T02:13:13.263Z","updated_at":"2025-08-18T02:13:13.263Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["architecture","command-bus","cqrs-architectural-pattern","cross-cutting-concerns","java","middleware"],"created_at":"2026-01-14T02:22:48.806Z","updated_at":"2026-01-14T02:22:49.566Z","avatar_url":"https://github.com/dathoangse.png","language":"Java","readme":"# Java CQRS CommandBus\n[![Build Status](https://travis-ci.com/dathoangse/java-cqrs-commandbus.svg?branch=develop)](https://travis-ci.com/dathoangse/java-cqrs-commandbus)\n[![codecov](https://codecov.io/gh/dathoangse/java-cqrs-commandbus/branch/develop/graph/badge.svg)](https://codecov.io/gh/dathoangse/java-cqrs-commandbus)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.dathoang.cqrs.commandbus/commandbus-core-full/badge.svg)](https://mvnrepository.com/artifact/net.dathoang.cqrs.commandbus/commandbus-spec)\n\nA lightweight \u0026 highly extensible CQRS framework for implementing application layer and CQRS architectural pattern in Java.\n\n## Who uses Java CQRS CommandBus\n* [YouthDev](https://youthdev.net/en/)\n\n## Benefits of using Command Bus\nCommand Bus pattern (a.k.a **Command Dispatcher Pattern**) help to:\n* **Decouple architecture from framework**: Good architecture does not depend on framework, it also does not depends on how the system is used (Our architecture should be the same whether we’re building a Restful API, WebSocket, TCP-socket or CLI applications.). By modeling all the interactions (business use-case) via Commands, application layer (or service layer) no longer need to depend on framework, and it also doesn’t depend on the protocol which was used to communicate with the system.\n* **Make the architecture scream**: Good architecture is the screaming architecture, which means we can easily know the system use-cases just by looking at the architecture. By presenting all the business user-case/intent and user interaction (with the system) via Command, we can quickly understand what the system can do just by looking at all the Commands available in the system, thus all the Commands have already screamed about the system use-cases.\n* **Unified communication interface**: With Command Bus pattern, the communication interface of application layer (service layer) is unified into only one method: the `dispatch()` method of Command Bus. This simplified interface will help to increase maintainability.\n* **Handle application layer (service layer) cross-cutting concerns in one place**: Because all the interactions to the system go through the `dispatch()` method of Command Bus, we can easily handle all the application layer (service layer) cross-cutting concerns like: logging, audit-logging, auto-restarting transaction (ex: restart on database deadlock exception), rate-limiting. Because of this, the `middleware pipeline` feature of `Java CQRS CommandBus` will help you to easily add middleware to handle cross-cutting concerns easily, as well as to extend functionalities.\n* **Built-in natural audit-log**: Because all the interactions to the system are modeled as Command (which represent business use-case/intent), the Command naturally represent system audit-log. By adding a middleware to log succeeded command, it naturally becomes the audit-log of the system.\n\n## Features\n**Java CQRS CommandBus** is a very lightweight and highly extensible CQRS CommandBus library that help you implement your application layer and CQRS architectural pattern:\n* **Lightweight**: The library comes with 2 distinct core modules: the `commandbus-spec` module and the `commandbus-core` module. The `commandbus-spec` module contains all the public interfaces of the framework, these interfaces are minimized to reduce the dependency of your project on the library, and your project only need to depends on the `commandbus-spec` module. The `commandbus-core` module contains the library’s implementation of the `commandbus-spec` module, your code will not need to depends on this module at all, dependency injection framework will automatically bind the implementation of the `commandbus-core` module to the interfaces in the `commandbus-spec` module. With this design, it’s possible and easy to swap out or reimplement the whole library with minimal efforts without affecting your codebase.\n* **Highly extensible**: We consider extensibility as the core value of the library, so we design it to make it highly extensible via: middleware pipeline. You can inject any custom middleware to intercept the handling of the commands dispatched into the bus.\n\n\n## Code style\nThe project follows [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html).\n\n## Git workflow\nBefore v0.3.0, the project uses [Gitflow](https://nvie.com/posts/a-successful-git-branching-model/).\n\nFrom v0.3.0, the project uses [Trunk-based development](https://trunkbaseddevelopment.com/), and **master** branch will be used as trunk.\n\n## Versioning\nThe project uses [SemVer v2.0.0](https://semver.org/).\n\n## Integrate into your project\n\n### For maven project\n\nAdd the dependency:\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003enet.dathoang.cqrs.commandbus\u003c/groupId\u003e\n    \u003cartifactId\u003ecore\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.0\u003c/version\u003e\n    \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n### For gradle project\n\nAdd the dependency:\n\n```\ncompile group: 'net.dathoang.cqrs.commandbus', name: 'core', version: '0.1.0', ext: 'pom'\n```\n\n## Contribute\nWe welcome all contributions.\nPlease fork the repository and base your work on **develop** branch.\nBefore creating pull request, please make sure:\n* All tests passed.\n* There is 100% code coverage on all new codes.\n\n## License\nJava CQRS CommandBus is an Open Source Software released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdathoangse%2Fjava-cqrs-commandbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdathoangse%2Fjava-cqrs-commandbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdathoangse%2Fjava-cqrs-commandbus/lists"}