Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AxonSerializer documentation and enforce ReplayToken#context to String #368

Open
smcvb opened this issue Jan 9, 2025 · 1 comment · May be fixed by #370
Open

AxonSerializer documentation and enforce ReplayToken#context to String #368

smcvb opened this issue Jan 9, 2025 · 1 comment · May be fixed by #370

Comments

@smcvb
Copy link
Member

smcvb commented Jan 9, 2025

Enhancement Description

First and foremost, we should add documentation to all the public fields and services in the AxonSerializer file.
This will help our users to deal with our Kotlin serialization support.

Furthermore, and more importantly, the ReplayTokenSerializer currently does not support the ReplayToken#context field.
This field was moved to a latter issue, since we wanted to investigate whether we could cleanly support a context of type Any with Kotlin's serialization logic.
Sadly enough, there's no straightforward solution to this; not without adjusting the context field of the ReplayToken in Axon Framework itself.
That is, however, a breaking change, and as such, cannot be done.

Instead, we'll adjust the context field in Axon Framework 5, which is currently being worked on.
Because of the foresight to AF5, we feel it's justified to stick to a String-based context in the ReplayToken.
This should also allow more complex objects as the context, although it requires the user to do the de-/serialization, instead of AF.

Current Behaviour

We're lacking documentation on all the public fields and services in the AxonSerializer, which we should cover for our users.
Furthermore, the ReplayToken#context should be supported in the ReplayTokenSerializer.

Wanted Behaviour

  1. Documentation on all public fields and components in the AxonSerializer.
  2. Support for a String-based ReplayToken#context

Possible Workarounds

None

@smcvb smcvb added this to the Release 4.11.0 milestone Jan 9, 2025
@smcvb smcvb self-assigned this Jan 9, 2025
@smcvb
Copy link
Member Author

smcvb commented Jan 14, 2025

For those working on this issue, there's a partial branch called bug/support-reset-context that works towards the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment