{"id":33927301,"url":"https://github.com/filipdulic/bus-queue","last_synced_at":"2026-04-10T10:02:36.038Z","repository":{"id":52926832,"uuid":"162187708","full_name":"filipdulic/bus-queue","owner":"filipdulic","description":"Lock free bounded non blocking pub sub queue","archived":false,"fork":false,"pushed_at":"2025-11-04T15:43:37.000Z","size":267,"stargazers_count":76,"open_issues_count":10,"forks_count":11,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-03-11T15:51:40.876Z","etag":null,"topics":["async","bus","lock-free","pub","slow-subscribers"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/filipdulic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-17T20:44:28.000Z","updated_at":"2026-02-23T19:00:45.000Z","dependencies_parsed_at":"2022-08-24T08:10:51.885Z","dependency_job_id":null,"html_url":"https://github.com/filipdulic/bus-queue","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/filipdulic/bus-queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipdulic%2Fbus-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipdulic%2Fbus-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipdulic%2Fbus-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipdulic%2Fbus-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filipdulic","download_url":"https://codeload.github.com/filipdulic/bus-queue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipdulic%2Fbus-queue/sbom","scorecard":{"id":399561,"data":{"date":"2025-08-11","repo":{"name":"github.com/filipdulic/bus-queue","commit":"1ac846b739669df22c9320dfbad3ed3727028cb8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Code-Review","score":1,"reason":"Found 3/20 approved changesets -- score normalized to 1","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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","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":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/md-inc.yml:1","Warn: no topLevel permission defined: .github/workflows/plantuml.yml:1","Warn: no topLevel permission defined: .github/workflows/rust.yml:1","Warn: no topLevel permission defined: .github/workflows/tarpaulin.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/md-inc.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/md-inc.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/md-inc.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/md-inc.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/plantuml.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/plantuml.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/plantuml.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/plantuml.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:98: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/rust.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tarpaulin.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/tarpaulin.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tarpaulin.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/tarpaulin.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tarpaulin.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/tarpaulin.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tarpaulin.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/tarpaulin.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tarpaulin.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/filipdulic/bus-queue/tarpaulin.yml/master?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  15 third-party GitHubAction dependencies pinned"],"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":"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":"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 22 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-18T19:47:51.623Z","repository_id":52926832,"created_at":"2025-08-18T19:47:51.623Z","updated_at":"2025-08-18T19:47:51.623Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31637748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["async","bus","lock-free","pub","slow-subscribers"],"created_at":"2025-12-12T10:54:53.264Z","updated_at":"2026-04-10T10:02:36.033Z","avatar_url":"https://github.com/filipdulic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":" # Lock-free Bounded Non-Blocking Pub-Sub Queue\n\n This is a publish subscribe pattern queue, where the publisher is never blocked by\n slow subscribers. The side effect is that slow subscribers will miss messages. The intended\n use-case are high throughput streams where receiving the latest message is prioritized over\n receiving the entire stream. Market Data Feeds, Live Streams, etc....\n\n The underlying data-structure is a vector of Arc(s) eliminating the use of copies.\n\n## Features\n * Lock-Free Write/Read - Lock-Free for Publisher and Lock-Free for Subscribers.\n * Bounded - Constant size of memory used, max is **sizeof(MsgObject)*(queue_size + sub_cnt + 1)**.\n   This is an edge-case where each subscriber is holding a ref to an object while the publisher\n   has published a full length of queue in the mean time.\n * Non-Blocking - The queue never blocks the publisher, slow subscribers miss data proportinal to\n   their speed.\n * Pub-Sub - Every Subscriber that can keep up with the Publisher will recieve all the data the\n   Publisher publishes.\n * **channel** - a raw Pub/Sub channel implementation without the thread synchronisation and futures logic.\n * **bus** - an async Pub/Sub queue with **futures::sink::Sink** and **futures::stream::Stream** traits.\n\n**bus::Publisher**, and **channel::Sender** are used to broadcast data to **bus::Subscriber**, and\n**channel::Receiver** pools. Subscribers are clone-able such that many threads, or futures, can receive\ndata simultaneously. The only limitation is that Subscribers have to keep up with the frequency of the\nPublisher. If a Subscriber is slow it will drop data.\n\n## Disconnection\n\nThe broadcast and receive operations on channels will all return a **Result**\nindicating whether the operation succeeded or not. An unsuccessful operation\nis normally indicative of the other half of a channel having \"hung up\" by\nbeing dropped in its corresponding thread.\n\nOnce half of a channel has been deallocated, most operations can no longer\ncontinue to make progress, so **Err** will be returned. Many applications\nwill continue to **unwrap** the results returned from this module,\ninstigating a propagation of failure among threads if one unexpectedly dies.\n\n\n# Examples\n\n## Simple raw usage\n\n```rust\nextern crate bus_queue;\nuse bus_queue::flavors::arc_swap::bounded;\n\nlet (tx, rx) = bounded(10);\n(1..15).for_each(|x| tx.broadcast(x).unwrap());\n\nlet received: Vec\u003ci32\u003e = rx.map(|x| *x).collect();\n// Test that only the last 10 elements are in the received list.\nlet expected: Vec\u003ci32\u003e = (5..15).collect();\n\nassert_eq!(expected, received);\n```\n\n## Simple async usage\n\n```rust\nuse bus_queue::flavors::arc_swap::async_bounded;\nuse futures::executor::block_on;\nuse futures::stream;\nuse futures::StreamExt;\n\nlet (publisher, subscriber1) = async_bounded(10);\nlet subscriber2 = subscriber1.clone();\n\nblock_on(async move {\n    stream::iter(1..15)\n        .map(|i| Ok(i))\n        .forward(publisher)\n        .await\n        .unwrap();\n});\n\nlet received1: Vec\u003cu32\u003e = block_on(async { subscriber1.map(|x| *x).collect().await });\nlet received2: Vec\u003cu32\u003e = block_on(async { subscriber2.map(|x| *x).collect().await });\n// Test that only the last 10 elements are in the received list.\nlet expected = (5..15).collect::\u003cVec\u003cu32\u003e\u003e();\nassert_eq!(received1, expected);\nassert_eq!(received2, expected);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipdulic%2Fbus-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipdulic%2Fbus-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipdulic%2Fbus-queue/lists"}