Skip to content
Discussion options

You must be logged in to vote

In the failed message produce, the data -m '{"family" : "genus" }' should have been rejected,

The schema validation only happens when the producer connects to the broker. When the producer sends a message with wrong format, the message could still be sent successfully. If you want to validate the schema when sending messages, you should create an AUTO_PRODUCE producer. See https://pulsar.apache.org/docs/2.11.x/schema-understand/#auto-schema

It seems that the Pulsar CLI cannot create an AUTO_PRODUCE producer currently.

BTW, isSchemaValidationEnforced only enforces the schema validation for bytes producer. i.e. a bytes producer cannot connect to a topic that already has schema, if users w…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tisonkun
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
deprecated/question Questions should happened in GitHub Discussions
2 participants
Converted from issue

This discussion was converted from issue #20022 on June 15, 2023 14:41.