EVENTDBX_* environment variables so you can drop it into Spring, Micronaut, Quarkus, or standalone JVM services.
Feature highlights
- Blocking control-socket client with parity to
eventdbxjs(create,apply,patch,archive/restore,list,events,get,select). - Noise XX (+ PSK) transport enabled by default; opt into plaintext with
noNoise/EVENTDBX_NO_NOISEwhen the server allows it. - Publish target routing per mutation via
PublishTarget.of(...)orpublishTarget("plugin:mode:priority"). - Retry/backoff, connect/request timeouts, and env-driven defaults for host, port, token, tenant, and verbosity.
- JSON payloads/metadata handled with Jackson
JsonNodeso you can work with strongly typed DTOs or raw trees.
Install
Maven
Gradle (Kotlin DSL)
The Noise handshake depends on the native
snownoise library in this repo
(native/snownoise). Run cargo build --release --manifest-path native/snownoise/Cargo.toml and ensure the built library is on
java.library.path (or set SNOWNOISE_LIB / SNOWNOISE_LIB_PATH) before
connecting. Artifacts are published to Maven Central:
https://central.sonatype.com/artifact/com.eventdbx/eventdbx-javaQuickstart
EventDbxClient is AutoCloseable, and defaults will pull host/port/token/tenant from the environment. Per-call token overrides let you scope mutations to a request without rebuilding the client.
Publish targets
plugin:mode:priority (mode/priority optional).
Write aggregates and events
create seeds a snapshot and first event atomically, apply appends events, patch issues RFC 6902 operations against historical payloads, and archive/restore toggle write access while preserving history.
Read aggregates and events
Page.nextCursor() to resume pagination, and token on PageOptions, AppendOptions, CreateAggregateOptions, or PatchOptions to scope a call without rebuilding the client.
Retry and timeouts
RetryPolicycontrols exponential backoff (maxAttempts,initialDelay,maxDelay); defaults to a single attempt.connectTimeoutandrequestTimeoutlive onEventDbxConfigand default to 3s / 10s respectively.client.isConnected()andclient.disconnect()help when hot reloading or orchestrating graceful shutdowns.
Runtime configuration
| Variable | Default | Description |
|---|---|---|
EVENTDBX_HOST | 127.0.0.1 | Hostname or IP address of the control socket. |
EVENTDBX_PORT | 6363 | TCP port for the control plane. |
EVENTDBX_TOKEN | empty | Control token forwarded during the handshake. |
EVENTDBX_TENANT_ID | empty | Tenant identifier included in the initial hello. |
EVENTDBX_VERBOSE | false | Set 1/true to request verbose mutation responses. |
EVENTDBX_NO_NOISE | false | Set 1/true to request plaintext transport (server must allow it). |
EVENTDBX_NOISE_PATTERN | Noise_NNpsk0_25519_ChaChaPoly_SHA256 | Override the Noise pattern used during the handshake. |
Noise transport
Noise is enabled by default with a PSK derived from the control token. Only disable it for controlled testing by passingnoNoise(true) on EventDbxConfig or setting EVENTDBX_NO_NOISE=1; production deployments should keep Noise on. You can also override the handshake pattern with EVENTDBX_NOISE_PATTERN when experimenting with other Noise variants.