Azure Event Hubs Avro Data не удается опустошать в Fabric EventStreamJAVA

Программисты JAVA общаются здесь
Anonymous
Azure Event Hubs Avro Data не удается опустошать в Fabric EventStream

Сообщение Anonymous »

Я посылаю Avro-сериализованные сообщения из Kafka в Azure Event Hubs с использованием Schemaregistryapacheavroserializer . Схема хранится в реестре схемы Azure, а продюсер успешно отправляет события. < /P>

Код: Выделить всё

public EventHubProducerService(
@Value("${EVENTHUB_CONNECTION_STRING}") String connectionString,
@Value("${eventhub.name}") String eventHubName,
@Value("${schema-registry.endpoint}") String schemaRegistryEndpoint,
@Value("${schema-registry.group}") String schemaRegistryGroup) {
tokenCredential = new DefaultAzureCredentialBuilder().build();

this.producerClient = new EventHubClientBuilder()
.connectionString(connectionString, eventHubName)
.buildProducerClient();

SchemaRegistryAsyncClient schemaRegistryClient = new SchemaRegistryClientBuilder()
.credential(tokenCredential)
.fullyQualifiedNamespace(schemaRegistryEndpoint)
.buildAsyncClient();

this.schemaRegistryApacheAvroSerializer = new SchemaRegistryApacheAvroSerializerBuilder()
.schemaRegistryClient(schemaRegistryClient)
.schemaGroup(schemaRegistryGroup)
.autoRegisterSchemas(true)
.avroSpecificReader(true)
.buildSerializer();
}

public void sendMessage(AgreementLifecycleDomainSourceType message) {
EventData eventData = schemaRegistryApacheAvroSerializer.serialize(
message, TypeReference.createInstance(EventData.class)
);

SendOptions sendOptions = new SendOptions().setPartitionId("1");
producerClient.send(Collections.singletonList(eventData), sendOptions);
}
< /code>
Когда я подключаю этот концентратор событий к Microsoft Fabric EventReam и пытаюсь просмотреть данные, я получаю эту ошибку: < /p>
Source 'EventHubInputAdapter' had occurrences of kind 'InputDeserializerError.InvalidData'.
Invalid Avro Format.
Любая идея была бы полезна!

Подробнее здесь: https://stackoverflow.com/questions/794 ... ventstream

Вернуться в «JAVA»