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 2021/06/22 06:03:46 UTC
[GitHub] [pulsar] congbobo184 commented on a change in pull request #10995: [issue 10989 ] Java Client: KeyValueSchema with AutoConsume component - make it work if the topic schema is still not set
congbobo184 commented on a change in pull request #10995:
URL: https://github.com/apache/pulsar/pull/10995#discussion_r655892250
##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleSchemaTest.java
##########
@@ -555,7 +555,16 @@ public void testAutoKeyValueConsume(boolean batching) throws Exception {
Schema.AVRO(V1Data.class),
KeyValueEncodingType.SEPARATED);
- try (Producer<KeyValue<V1Data, V1Data>> p = pulsarClient.newProducer(pojoSchema)
+ try (Consumer<KeyValue<GenericRecord, V1Data>> c3before = pulsarClient.newConsumer(
+ Schema.KeyValue(
+ Schema.AUTO_CONSUME(),
+ Schema.AVRO(V1Data.class),
+ KeyValueEncodingType.SEPARATED))
Review comment:
could you add `KeyValueEncodingType.INLINE ` test?
##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
##########
@@ -1012,7 +1013,8 @@ public MemoryLimitController getMemoryLimitController() {
@SuppressWarnings("rawtypes") Schema finalSchema = schema;
return schemaInfoProvider.getLatestSchema().thenCompose(schemaInfo -> {
if (null == schemaInfo) {
- if (!(finalSchema instanceof AutoConsumeSchema)) {
+ if (!(finalSchema instanceof AutoConsumeSchema)
+ && !(finalSchema instanceof KeyValueSchema)) {
Review comment:
one of keySchema and valueSchema is `AutoConsumeSchema` need this right?
--
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:
users@infra.apache.org