GitHub user bigbang489 added a comment to the discussion: [Pulsar Client] Is 
there a way to specify a schema version instead of uploading SchemaInfo to 
broker?

We are building an adapter to integrate Pulsar to SAP Integraion system. Sender 
adapter will consume message from a topic, Receiver adapter will produce 
message to a topic. For Receiver adapter, there is no certain time when it is 
called, if it's called once a month and keeping connection open for a long time 
to just send a message a month is not a good idea. That is why we decided to 
close and re-connect to broker everytime.
Btw, Is there any way to tell the Pulsar client (that has producers only) that 
it should close the connectivity if there is no message to publish after an 
amount of time, and re-connect to brokers when it needs to send a message again?
For the 

> If we only send the schema version, there is no way for us to verify if the 
> client is using the right schema. Because a client can just provide a random 
> schema number and produce the data with a different schema.

There is no guarantee that the encoded data sent to brokers is using correct 
schema in case they using their own custom Schema implementation. I think 
skipping verifying SchemaInfo will make sense, if the client itself can assures 
the correctness of schema version. By doing this, not only faster connectivity 
establishment, but also be able to send messages with diffrent versions without 
creating new producers for each version.

GitHub link: 
https://github.com/apache/pulsar/discussions/18459#discussioncomment-4133618

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@pulsar.apache.org

Reply via email to