原因:java.lang.IllegalStateException:为+ kafka流创建的架构对象过多

时间:2018-08-08 03:05:23

标签: stream apache-kafka

我已经使用Java创建了kafka流项目。 kafka流停止并抛出以下错误:

  

eption:正在捕获异常。 taskId = 0_18,   处理器= KSTREAM-SOURCE-0000000000,主题=儿童,分区= 18,   偏移量= 414977           在org.apache.kafka.streams.processor.internals.StreamTask.process(StreamTask.java:232)           在org.apache.kafka.streams.processor.internals.AssignedTasks.process(AssignedTasks.java:403)           在org.apache.kafka.streams.processor.internals.TaskManager.process(TaskManager.java:317)           在org.apache.kafka.streams.processor.internals.StreamThread.processAndMaybeCommit(StreamThread.java:942)           在org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:822)           在org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:774)           在org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:744)   造成原因:org.apache.kafka.common.errors.SerializationException:   序列化Avro消息时出错,原因是:   java.lang.IllegalStateException:为以下内容创建的模式对象过多   LocationGeofenceEvent键!           在io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.register(CachedSchemaRegistryClient.java:152)           在io.confluent.kafka.serializers.AbstractKafkaAvroSerializer.serializeImpl(AbstractKafkaAvroSerializer.java:79)           在io.confluent.kafka.serializers.KafkaAvroSerializer.serialize(KafkaAvroSerializer.java:53)           在io.confluent.kafka.streams.serdes.avro.GenericAvroSerializer.serialize(GenericAvroSerializer.java:63)           在io.confluent.kafka.streams.serdes.avro.GenericAvroSerializer.serialize(GenericAvroSerializer.java:39)           在org.apache.kafka.streams.processor.internals.RecordCollectorImpl.send(RecordCollectorImpl.java:90)           在org.apache.kafka.streams.processor.internals.RecordCollectorImpl.send(RecordCollectorImpl.java:78)           在org.apache.kafka.streams.processor.in

我正在使用GenericAvroSerde以及以下导致问题的代码。请帮助我

@Bean
    public GenericAvroSerde genericValueSerde() {
        GenericAvroSerde serde = new GenericAvroSerde();
        serde.configure(Collections.singletonMap("schema.registry.url",
                properties.getSchemaRegistryUrl()), false); // XXX `false` for record values
        return serde;
    }

0 个答案:

没有答案