Denovo1998 commented on PR #25461: URL: https://github.com/apache/pulsar/pull/25461#issuecomment-4296557751
@poorbarcode @codelipenghui Seems like there are some issues? When geo-replicator creates a remote producer in the broker, it indeed carries the replicator's producer name and uses Schema.AUTO_PRODUCE_BYTES(). But the key point of AUTO_PRODUCE_BYTES is: when establishing a producer connection, it doesn't send the "specific schema of this message" all at once. The actual specific schema registration happens later during the message sending process, when encountering a new schema, it then triggers GET_OR_CREATE_SCHEMA. This call chain looks like this locally: 1. When replicator acts as a producer to establish a connection, the `ProducerImpl.connectionOpened(...)` method sends the PRODUCER command, which includes the producerName. But later, when it actually needs to register a specific schema, it follows the path `tryRegisterSchema(...) -> getOrCreateSchemaAsync(...)`. 2. The method finally calls Commands' newGetOrCreateSchema(requestId, topic, schemaInfo). 3. This command builder only wrote requestId/topic/schema, without writing producerName. 4. So the CommandGetOrCreateSchema sent from the sender to the broker always has the field producerName absent. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
