-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[schema] AutoConsume should use the schema associated with messages as both writer and reader schema #4325
Conversation
…or both writer and reader schema *Motivation* AutoConsume should use the schema associated with the messages for decoding the schemas. *Modifications* - provide a flag enable or disable using the provided schema as the reader schema - for AUTO_CONSUME schema, disable usnig the provided schema as the reader schema. so it can use the right schema version for decoding messages into right generic records - provide a few util methods for displaying schema data
/cc @tuteng @congbobo184 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall lgtm
@@ -732,11 +732,14 @@ protected void preProcessSchemaBeforeSubscribe(PulsarClientImpl pulsarClientImpl | |||
SchemaInfo schemaInfo = schemaInfoProvider.getLatestSchema(); | |||
if (schemaInfo.getType() != SchemaType.AVRO){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here can add SchemaType.JSON
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@congbobo184 done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall lgtm
run Java8 Tests |
run java8 tests |
Motivation Pulsar 2.4.0 Added schema versioning to support multi version messages produce and consume apache#3876 apache#3670 apache#4211 apache#4325 apache#4548. but the doc is not updated accordingly. Modifications Update the schema version in the pulsar registry doc for releases 2.4.0/2.4.1/2.4.2.
Motivation
AutoConsume should use the schema associated with the messages for decoding the schemas.
Modifications
schema version for decoding messages into right generic records