[#209] Add per-tenant snapshotting to the multi-tenancy demo - #4794
Merged
laura-devriendt-lemon merged 2 commits intoJul 30, 2026
Merged
Conversation
laura-devriendt-lemon
requested review from
hjohn,
jangalinski and
smcvb
and removed request for
a team
July 28, 2026 13:46
laura-devriendt-lemon
marked this pull request as draft
July 28, 2026 13:47
laura-devriendt-lemon
force-pushed
the
feature/axoniq/176/209_event_storage_snapshot_demo
branch
2 times, most recently
from
July 29, 2026 09:47
92233d4 to
1bc2cab
Compare
laura-devriendt-lemon
force-pushed
the
feature/axoniq/176/209_event_storage_snapshot_demo
branch
from
July 29, 2026 09:57
1bc2cab to
27d0936
Compare
laura-devriendt-lemon
marked this pull request as ready for review
July 29, 2026 10:04
laura-devriendt-lemon
force-pushed
the
feature/axoniq/176/209_event_storage_snapshot_demo
branch
from
July 30, 2026 08:50
1b39c86 to
3688bb4
Compare
smcvb
approved these changes
Jul 30, 2026
Contributor
There was a problem hiding this comment.
No concerns here. But, I must say, this "example" looks more like an extremely extensive integration test than a user-facing example. In other words, it's an example for us to ensure multi-tenancy works as intended, not an example to the user how to enable and use multi-tenancy.
Letting it slide, as I don't think we should enforce that distinction right now, but it's worth noting that the examples folder is essentially intended as material for users to comprehend how to achieve something. Having things like demo life cycle and outcome objects, to me, don't belong in a user's application, those belong in test functionality.
FYI, the examples build fails, so we should fix that before merging :-)
laura-devriendt-lemon
deleted the
feature/axoniq/176/209_event_storage_snapshot_demo
branch
July 30, 2026 09:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds per-tenant snapshotting to the multi-tenancy demo, the half of axoniq-framework#263 the demo did not yet cover. Tracked by axoniq-framework#209, which is what the
#209in the title refers to rather than anything in this repository.What it adds
A new step 2 in
DemoLifecycle.run. Both known tenants fill a course under the same identifier, so each tenant's own snapshot store ends up holding its own snapshot of that identifier. The run logs:Snapshot isolation cannot be shown behaviourally, because a snapshot changes no behaviour. The demo therefore reads the two per-tenant stores through a new
TenantSnapshotsseam and compares snapshot contents. Comparing the framework's snapshot envelopes would prove nothing, since each envelope carries its own write timestamp and never compares equal to another, even if one tenant had read the other's snapshot.Also included
MultiTenancyDemoITfailed about one run in four withCANCELLED: Unknown Context springfieldon its first command. Provisioning waits until the tenant provider lists a tenant, which does not mean Axon Server routes to its context yet. The existingEnrollments.causedByTenantNotReadyretry now covers every tenant's first command, not only the runtime-added one.Depends on axoniq-framework#263
TenantSnapshotStoreFactoryexists only on that branch, so examples CI fails here until it merges. Verified locally againstfeature/176/209_eventStoreatcfa9839b92, where the 12 core tests, the declarative smoke test, and the Axon Server integration test all pass.