Add a NATS transport (NatsNetwork) for resonate-on-nats
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- java
Research direction
Start with src/main/java/io/resonatehq/resonate/Network.java and compare the TypeScript and Python NatsNetwork implementations referenced in the issue. Read resonate-on-nats/cmd/client.go to verify the JetStream subjects, headers, inbox replies, and receive subscriptions. Done means Java workers can use the NATS transport while preserving the stated envelope and dependency-packaging requirements.
Written by the indexing model from the issue text.
Description
Summary
resonate-on-nats is a Resonate server that uses NATS JetStream for both storage and transport. It exposes no HTTP endpoint, so the Java SDK's Network.HttpNetwork cannot reach it. The TypeScript and Python SDKs already ship a NatsNetwork implementation of their Network interface; the Java SDK has no equivalent, so Java workers cannot connect to a NATS-backed server.
Proposal
Add a Network.NatsNetwork implementing the Network interface (src/main/java/io/resonatehq/resonate/Network.java) on top of jnats. Since the SDK currently has no external runtime dependencies beyond Jackson, this may warrant a separate artifact or an optional dependency so the core stays lean.
Wire contract
The protocol envelope is unchanged — the same {kind, head, data} JSON with head.version = "2026-04-01" — only the carrier differs:
- Send: publish the request envelope via JetStream to
resonate.requests.{token}, wheretokenis the base64url (no padding) encoding of the routing origin. The routing origin is the lineage root: the substring of the promise/taskidbefore the first., or"default"for requests without a lineage (schedules, debug). - Set
head["resonate:origin"]on every request. - Reply: create a private inbox subject (
_INBOX.*), subscribe to it, and set theResonate-Reply-ToNATS header on the publish. The response envelope (correlated byhead.corrId) arrives on the inbox. NATS native request/reply is not used. - Recv: subscribe to
resonate.recv.{group}.{pid}(unicast) andresonate.recv.{group}with queue group{group}(anycast) for inboundexecute/unblockmessages.
References
- TypeScript implementation:
resonate-sdk-ts/src/network/nats.ts - Python implementation:
resonate-sdk-py/src/resonate/network/nats.py - Server:
resonate-on-nats(seecmd/client.gofor a minimal client)
The TypeScript and Python implementations mirror each other closely and serve as the reference for the contract above.
- Dominant language
- Java
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from resonatehq/resonate-sdk-java
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in resonatehq/resonate-sdk-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
objectionary/hone-maven-plugin#1061 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
spring-projects/spring-modulith#1895 ·