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

[schema] AutoConsume should use the schema associated with messages as both writer and reader schema #4325

Merged
merged 3 commits into from
May 22, 2019

Conversation

sijie
Copy link
Member

@sijie sijie commented May 21, 2019

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

…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
@sijie sijie added this to the 2.4.0 milestone May 21, 2019
@sijie sijie self-assigned this May 21, 2019
@sijie
Copy link
Member Author

sijie commented May 21, 2019

/cc @tuteng @congbobo184

Copy link
Contributor

@codelipenghui codelipenghui left a 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){
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@congbobo184 congbobo184 left a comment

Choose a reason for hiding this comment

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

overall lgtm

@codelipenghui
Copy link
Contributor

run Java8 Tests

@sijie
Copy link
Member Author

sijie commented May 22, 2019

run java8 tests

@srkukarni srkukarni merged commit bf06ef3 into apache:master May 22, 2019
jiazhai pushed a commit that referenced this pull request Jul 1, 2020
Motivation
Pulsar 2.4.0 Added schema versioning to support multi version messages produce and consume #3876 #3670 #4211 #4325 #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.
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this pull request Aug 24, 2020
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.
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.

4 participants