Skip to content

Conversation

@ozangunalp
Copy link

@ozangunalp ozangunalp commented Jan 12, 2026

During the testing of quarkusio/quarkus#51401, we realised that the migration to v3 involves handling the change of schema ids from using 8-bytes to 4-bytes.

While there are distinct IdHandler implementations available to the client application to use, there isn't any easy migration path to use with message processing applications producing/consuming on topics (eg. Kafka).

The problem of an active topic is explained here : quarkusio/quarkus#51401 (comment)

This change proposes an OptimisticFallbackIdHandler to write 4-byte ids and read both 4 and 8 byte ids to be used in a migration scenario.

Because the payload format doesn't include any format versionning, this IdHandler makes the following assumption to distinguish between 4-bytes 8-bytes ids: The schema ids are greater than 0 and smaller than integer max value.

The change requires some non-breaking modifications to AbstractDeserializer, and maybe to the IdHandler interface that can be discussed.

Additionally, I couldn't figure out what to do for the Go SDK.

@ozangunalp
Copy link
Author

@carlesarnal fyi

@carlesarnal
Copy link
Member

carlesarnal commented Jan 14, 2026

Thanks for the PR, as we've discussed, this addresses a real migration pain point for v2 → v3 upgrades. I think the approach makes sense, but it's probably worth documenting the assumptions as javadoc in the OptimisticFallbackIdHandler class.

@ozangunalp ozangunalp marked this pull request as ready for review January 16, 2026 14:14
@ozangunalp
Copy link
Author

@carlesarnal I've added some docs for the Id handler class

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants