feat(java): serializers, middleware, dashboard, webhooks, CLI#301
Conversation
Queue.use() registers Middleware; onEnqueue runs on the producer, before/after/onError wrap handler execution, and the outcome hooks fire from onOutcome.
JDK httpserver-backed read/action API over a Queue, serving the snake_case + Unix-ms contract with optional token auth and static SPA serving.
WebhookManager (CRUD + Middleware) persists subscriptions via the settings store and delivers matching job outcomes over HTTP with an HMAC-SHA256 signature and retries.
Commands: stats, enqueue, jobs, cancel, pause/resume, dlq, dashboard.
|
Warning Review limit reached
More reviews will be available in 1 minute and 5 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (24)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Third of the Java SDK split series (follows #300). Adds cross-cutting infrastructure: serializers, middleware, the dashboard server, webhooks, and a CLI.
What's here
serialization/):SignedSerializer(HMAC-SHA256, 32-byte tag prefix, constant-timeMessageDigest.isEqual) andEncryptedSerializer(AES-GCM, 12-byte IV prefix, 128-bit tag), each wrapping a delegate. JDK-only (javax.crypto).middleware/): aMiddlewareinterface with 8 default hooks (onEnqueue / before / after / onError / onCompleted / onRetry / onDeadLetter / onCancel) plusTaskContext/EnqueueContext(mutable payload + options).Queue.use(mw)registers it; the worker wraps each handler.dashboard/):DashboardServerover the JDKcom.sun.net.httpserver, with aContractmapper (camelCase → snake_case, Unix-ms, lowercase status) matching the cross-SDK dashboard API. Endpoints for stats / jobs / dead-letters / metrics / workers + cancel/retry/pause/resume; token auth; static SPA serving (path-traversal-guarded).webhooks/):WebhookManagerimplementsMiddlewareand auto-dispatches matching lifecycle events to registered HTTP endpoints (java.net.http,X-Taskito-Signature: sha256=<hmac>, retry); CRUD persisted under a settings key.cli/): a picocliCliwithstats/enqueue/jobs/cancel/pause/resume/dlq/dashboardsubcommands.Scope
Pure-Java cross-cutting layers — no new native surface. Workflows, packaging, locks, ergonomics, etc. follow in later PRs. Targets Java 11.
Verification
Java compiles under
--release 11(main + testsDashboardTest/WebhookTest). The Rust workspace is covered by existing CI; the dedicated Java CI job arrives later in the series.