gvolpe opened a new issue #10244:
URL: https://github.com/apache/pulsar/issues/10244


   **Describe the bug**
   
   Pulsar checks schema compatibility of JSON schemas when deploying new 
consumers even when the schema compatibility strategy of the namespace is set 
to 
[ALWAYS_COMPATIBLE](https://pulsar.apache.org/docs/en/schema-evolution-compatibility/#schema-compatibility-check-strategy),
 where *all changes should be allowed*.
   
   **To Reproduce**
   
   Steps to reproduce the behavior:
   
   1. Set the schema compatibility strategy to `FULL` (the default for JSON and 
AVRO).
   2. Deploy a producer and consumer with any JSON schema.
   3. Set the schema compatibility strategy to `ALWAYS_COMPATIBLE`.
   4. Deploy new versions of the producer and consumer with breaking changes in 
the schema, or even a new schema.
   
   At this point, Pulsar will fail with an error similar to this:
   
   ```
   [pulsar-client-io-1-1] WARN  o.a.p.c.i.ConsumerImpl - 
[non-persistent://public/default/test][test-sub] Failed to subscribe to topic 
on IP:PORT
   
org.apache.pulsar.client.api.PulsarClientException$IncompatibleSchemaException: 
org.apache.avro.SchemaValidationException: Unable to read schema:
   ```
   
   To set the schema compatibility strategy of a namespace, run the following 
command.
   
   ```
   # pulsar-admin namespaces set-schema-compatibility-strategy --compatibility 
ALWAYS_COMPATIBLE public/default
   ```
   
   **Expected behavior**
   
   Pulsar should NOT check for schema compatibility when the strategy is set to 
`ALWAYS_COMPATIBLE`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to