You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/09 14:05:49 UTC

[GitHub] [pulsar] MatrixHB opened a new issue #14627: Question about the design of pulsar schema

MatrixHB opened a new issue #14627:
URL: https://github.com/apache/pulsar/issues/14627


   ```
   Producer producer = client.newProducer(Schema.AVRO(User.class)).create();
   
   Producer producer = client.newProducer(Schema.generic(schemaInfo)).create();
   ```
   
   When a pulsar producer is created, it is binding with a specific schema. May I ask what is the advantage of this design?
   
   In kafka, one Producer is not binding with schema, so it can support multiple schemas. Is it possible for Pulsar to do that?
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #14627: Question about the design of pulsar schema

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #14627:
URL: https://github.com/apache/pulsar/issues/14627#issuecomment-1067565147


   @MatrixHB Please check the schema documentation https://pulsar.apache.org/docs/en/schema-get-started/#why-use-schema which shows why to use Pulsar Schema.
   
   > You can use BYTES schema as above. I think the schema mostly designed for pulsar-sql
   
   It's not only for pulsar-sql, it allows users to send type messages, not only binary stream.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] tjiuming commented on issue #14627: Question about the design of pulsar schema

Posted by GitBox <gi...@apache.org>.
tjiuming commented on issue #14627:
URL: https://github.com/apache/pulsar/issues/14627#issuecomment-1063863536


   ```
   Producer producer = client.newProducer(Schema.BYTES).create();
   ```
   You can use BYTES schema as above. I think the schema mostly designed for pulsar-sql


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on issue #14627: Question about the design of pulsar schema

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #14627:
URL: https://github.com/apache/pulsar/issues/14627#issuecomment-1063001194


   you can set the schema per message
   `producer.newMessage(Schema...)`
   without setting the Schema while creating the Producer


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org