Skip to content

product: rebuild as Sky Java Event Bus - #1

Merged
skylerblue333 merged 17 commits into
mainfrom
product/sky-java-event-bus-20260824
Aug 25, 2026
Merged

product: rebuild as Sky Java Event Bus#1
skylerblue333 merged 17 commits into
mainfrom
product/sky-java-event-bus-20260824

Conversation

@skylerblue333

Copy link
Copy Markdown
Owner

Next non-overlapping standalone product in the SKYCOIN4444 portfolio loop.

This branch replaces the mislabeled Python placeholder with a real dependency-free Java 21 event bus: bounded events/topics/attributes/payloads, concurrent topic registry, deterministic synchronous subscriber order, explicit unsubscribe handles, subscriber-failure isolation, metrics, hard topic/subscriber caps, a dependency-free test harness, strict javac warnings-as-errors gates, runnable JAR smoke testing, and non-root container packaging.

Status: engineering beta. This is an in-process JVM primitive, not Kafka/NATS/RabbitMQ, a durable queue/log, transactional outbox, exactly-once system, distributed broker, authentication layer, HA service, or production deployment.

Merge only after the exact PR head passes all declared CI gates.

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:dc21f018d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

private static void publishesInSubscriptionOrder() throws Exception {
var bus = new EventBus();
var seen = new ArrayList<String>();
try (var first = bus.subscribe("orders.created", event -> seen.add("first:" + event.payload()));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the test harness warning-free under -Werror

The first resource is never referenced inside the try body, so the workflow's javac -Xlint:all -Werror test compilation emits [try] auto-closeable resource first is never referenced and fails before any tests run; the other three resource declarations have the same problem. javac --help-lint describes try as warning about try-with-resources issues, so these handles need to be referenced or the specific warning suppressed.

Useful? React with 👍 / 👎.

Comment on lines +27 to +30
if (handlers.size() >= MAX_SUBSCRIBERS_PER_TOPIC) {
throw new IllegalStateException("subscriber capacity reached for topic");
}
handlers.add(consumer);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make the subscriber capacity check atomic

With 99 handlers already registered, two concurrent subscribe calls can both observe a size below 100 and then both append, leaving 101 handlers; this is reproducible against this commit. CopyOnWriteArrayList only makes the individual operations thread-safe, so the check-then-add sequence defeats the documented hard resource cap during concurrent registration and should be performed atomically.

Useful? React with 👍 / 👎.

@skylerblue333
skylerblue333 merged commit 1df3716 into mainAug 25, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@skylerblue333