Skip to content

Track and expose node capabilities per connection - #529

Open
hjohn wants to merge 1 commit into
mainfrom
feature/node-capabilities
Open

hjohn wants to merge 1 commit into
mainfrom
feature/node-capabilities

Conversation

@hjohn

@hjohn hjohn commented Oct 20, 2026 •

Copy link
Copy Markdown

Adds AxonServerConnection.supports(String capability), backed by the capabilities reported in PlatformInfo on every (re)connect in AxonServerManagedChannel.

Lets a client check in advance whether the node it's currently connected to supports an optional RPC/behavior, rather than calling it and reacting to UNIMPLEMENTED. Re-evaluated on every reconnect, so gaining/losing a capability (e.g. after moving to a different cluster node) takes effect immediately rather than being cached for the connection's lifetime.

A redirect is now followed to completion. Previously the client called GetPlatformServer and, on a redirect, simply opened the stream against the node it was pointed at without ever asking it anything. It now re-runs the handshake against each node it is sent to until one answers for itself, with a hop limit. Since every answer reports the capabilities of the node that produced it, the client holds the capabilities of whichever node it ends up on - including when it stops following redirects and stays put, because following one more hop would land it on an unqueried node again.

This happens inside connect(), before the connection is handed out, so there is no window in which the connection is usable with capabilities still unknown, and the set is fixed for as long as that connection holds.

Also exposes the two RPCs that supersede the snapshotted-source path: DcbEventChannel.sourceWithSnapshot and SnapshotChannel.findLastSnapshot. The source(SnapshottedSourceRequest) overload is deprecated, since Axon Server no longer implements the RPC behind it.

Depends on AxonIQ/axon-server-api#80 for PlatformInfo.capabilities, on #78 for the new RPCs, and on AxonIQ/axon-server-api#81 for SnapshotCandidate, which the new RPCs take as their candidates.

First consumer: AxoniqFramework's AxonServerEventStorageEngine, in a followup PR.

@hjohn
hjohn requested a review from a team as a code owner October 20, 2026 13:56
@hjohn
hjohn requested review from MGathier, m1l4n54v1c and trimoq and removed request for a team October 20, 2026 13:56
@hjohn
hjohn force-pushed the feature/node-capabilities branch from c54da83 to 61dd82a Compare October 20, 2026 14:05
@CLAassistant

CLAassistant commented Oct 20, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@smcvb smcvb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Frankly, I think this is fine as is. We can imagine all kinds of "nice" enumerations of option we'd have, but we (1) wouldn't have the list right now at all and (2) that'll tie us in to potential breaking API changes. By using a String for the capability, we have a lot of flexibility. Granted, I agree with @hatzlj, that some form of listing, somewhere, would be important.

@hjohn
hjohn force-pushed the feature/node-capabilities branch 2 times, most recently from ac152f9 to 22fdcaa Compare October 26, 2026 14:42

@smcvb smcvb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some minor pointers out of curiosity

@hjohn
hjohn force-pushed the feature/node-capabilities branch 5 times, most recently from 6f9141c to 6a7ce4c Compare November 2, 2026 09:49

@smcvb smcvb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My concerns have been addressed, hence I'm approving this pull request. We shouldn't forget to backport this to the patch branch!

Adds AxonServerConnection.supports(String capability), backed by the
capabilities reported in PlatformInfo on every (re)connect.

A redirect is now followed to completion: the node we are sent to is
asked for its own PlatformInfo in turn, until one answers for itself.
Previously the client took the redirect on trust and opened the stream
against a node it had never spoken to. Each answer reports the
capabilities of the node that produced it, so whichever node we end up
on we hold its capabilities - including when we stop following redirects
and stay where we are, since following one more hop would land us on an
unqueried node again.

This all happens inside connect(), before the connection is handed out,
so the set is known up front and fixed for as long as it holds.

Also adds DcbEventChannel.sourceWithSnapshot and
SnapshotChannel.findLastSnapshot for the superseding Axon Server RPCs,
and deprecates the source(SnapshottedSourceRequest) overload, whose RPC
is no longer implemented.
@hjohn
hjohn force-pushed the feature/node-capabilities branch from 6a7ce4c to 9c53457 Compare November 3, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants