Skip to content
CAI
Software that uses CAICheck a score

Protocol-Lattice/GoEventBus

67.7

Adequate · 21 September 2026

1.9k

lines of production code

Go

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Go library for building event-driven architectures, providing an event bus that manages asynchronous event dispatching through typed projections and batch handlers. It includes an event store with configurable buffer overrun policies, middleware hooks, and timeout handling to ensure robust processing. The library supports external message brokers like Redis and RabbitMQ via a provider interface and includes a dead-letter queue for handling failed events.

Features

Added GoEventBus hello world example

A new example demonstrating how to use the GoEventBus library has been added to the examples/hello\_world directory. The code shows how to create a dispatcher with a handler for a 'say\_hello' projection, initialize an EventStore with an 8K buffer and a DropOldest policy, and publish an event containing a name argument.

_examples/hello\world · high confidence

Added examples for event store overrun policies

New example programs have been added to demonstrate the behavior of the event store's overrun policies. The \drop\_oldest\ example shows how the system silently discards events when the buffer is full, while the \return\_error\ example illustrates the fail-fast behavior where subscribing additional handlers returns an error once the capacity is reached.

_examples/drop\oldest · high confidence

Added fasthttp example demonstrating event enqueueing and scheduled publishing

A new example application using fasthttp has been added to the examples/fasthttp directory. This example demonstrates how to integrate the GoEventBus library by setting up a dispatcher with handlers for 'sayHello' and 'computeSum' projections, creating an EventStore, and exposing an HTTP endpoint at /enqueue that accepts events via query parameters. The application runs a background loop that publishes enqueued events every 5 seconds, illustrating a pattern where HTTP requests enqueue events for asynchronous processing rather than immediate dispatch.

examples/fasthttp · high confidence

Added goroutine-based event subscription and publisher example

A new example file (examples/goroutines-subscribe-publisher/main.go) demonstrates how to use the GoEventBus library with asynchronous event handling. The example shows setting up a dispatcher with a 'user\_created' handler, creating an async event store, and running separate goroutines for event subscription (enqueueing) and publishing, along with graceful shutdown handling via context cancellation and signal listening.

examples/goroutines-subscribe-publisher · high confidence

Added middleware and hooks example for the GoEventBus EventStore

A new example file demonstrates how to integrate middleware and lifecycle hooks into the GoEventBus EventStore. It shows how to register a logging middleware to track handler execution time, as well as before, after, and error hooks to observe event processing, and includes a complete run-through of publishing events and retrieving metrics.

examples/middleware · high confidence

Added publisher example demonstrating typed event projections

A new example file (examples/publisher/main.go) has been added to demonstrate how to use the GoEventBus library with typed event projections. The example shows defining a struct (HouseWasSold) as a projection key alongside string-based keys (user\_created), publishing events with specific arguments, and handling them in a dispatcher. It also illustrates asynchronous publishing, graceful shutdown via signal handling, and retrieving metrics after draining the event store.

examples/publisher · high confidence

Added timeout handling examples for event handlers and publishers

New example programs demonstrate how the event bus handles timeouts: handler\_timeout shows a handler being cancelled when it exceeds a context deadline, and publisher\_timeout illustrates back-pressure behavior when the event store buffer is full and a publish operation times out.

_examples/handler\timeout · high confidence

Introduce batch event dispatch, dead-letter queue, and external broker providers

The event bus now supports batch handlers via \RegisterBatch\, which collect events for a projection and deliver them as slices to reduce per-event overhead for bulk operations. A new Dead Letter Queue (DLQ) captures events that fail or panic during dispatch, allowing inspection and replay. Additionally, the library adds a \Provider\ interface with a \JSONCodec\ for serializing events to external brokers like Redis Streams and RabbitMQ, enabling cross-process event delivery.

(repo-wide) · high confidence

Dependencies

Initial project setup with Go 1.23 and core dependencies

The project is initialized with Go 1.23.0 (toolchain 1.23.7) and establishes its primary dependencies: \github.com/fasthttp/router\ (v1.5.4), \github.com/rabbitmq/amqp091-go\ (v1.14.0), \github.com/redis/go-redis/v9\ (v9.18.0), and \github.com/valyala/fasthttp\ (v1.61.0). The \go.mod\ also includes \testcontainers-go\ (v0.34.0) for testing infrastructure. Example modules (\hello\_world\, \publisher\, \goroutines-subscribe-publisher\) are added, depending on \github.com/Protocol-Lattice/GoEventBus\ versions v0.1.44 and v0.1.45.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 62 → 68 (+5.4)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 88 → 93 (+4.8)
  • Architecture 69 → 100 (+31.0)
  • Maturity 54 → 57 (+3.3)
  • Readiness 61 → 73 (+11.7)
  • Security 89 → 71 (-18.0)

Resolved (14)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (8 lines × 2) (eventstore.go)
  • EventStore.Publish (cognitive 47) (eventstore.go)
  • EventStore.Publish (cyclomatic 20) (eventstore.go)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Low: security finding (details withheld)
  • Medium CVE: GO-2025-3563 (go.mod)
  • Medium vulnerability: GO-2026-5841 (go.mod)
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • Test reliability not included
  • Transaction.Commit (cognitive 26) (transaction.go)

New (42)

  • Critical CVE: [GHSA redacted] (go.mod)
  • Documentation: no installation or build instructions (README.MD)
  • Documentation: no licence statement (README.MD)
  • Documentation: no usage examples (README.MD)
  • Duplicated block (7 lines × 2) (eventstore.go)
  • EventStore.Subscribe (cognitive 22) (eventstore.go)
  • EventStore.dispatch (cognitive 48) (eventstore.go)
  • EventStore.dispatch (cyclomatic 18) (eventstore.go)
  • High CVE: [GHSA redacted] (go.mod)
  • High CVE: [GHSA redacted] (go.mod)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium CVE: GO-2025-3563 (go.mod)
  • Medium CVE: GO-2026-5024 (go.mod)
  • Medium vulnerability: GO-2026-4950 (go.mod)
  • …and 22 more

Changes since last survey

  • 9 commits — 7 feature/other, 2 fixes

By area

  • (root) — 9 commits

Notable commits

  • fix: fix: avoid blocking Redis pending message scan
  • fix: fix: skip empty Redis pending message scan
  • change: Harden MPMC event dispatch
  • change: feat: add Redis and RabbitMQ providers
  • change: feat: add ordered async handlers
  • change: test: add broker integration coverage and CI checks
  • change: test: force broker consumer shutdown in integration tests
  • change: test: resolve broker container endpoints
  • change: test: wait for Redis consumer group before publishing

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Protocol-Lattice/GoEventBus was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 1ab6e70fd537c7e30af3b70f04888eccbb74b2f8 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.