# Confluent azure event hub source connector show bytes in value schema

**URL:** <https://forum.confluent.io/t/confluent-azure-event-hub-source-connector-show-bytes-in-value-schema/3143>\
**Category:** Kafka Connect\
**Created:** [20 October 2021 06:22 UTC](https://forum.confluent.io/t/confluent-azure-event-hub-source-connector-show-bytes-in-value-schema/3143 "2021-10-20T06:22:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://forum.confluent.io/u/sam)\
**Post date:** [20 October 2021 06:22 UTC](https://forum.confluent.io/t/confluent-azure-event-hub-source-connector-show-bytes-in-value-schema/3143/1 "2021-10-20T06:22:07Z")

</div>

HI there:

We are now using confluent 6.1.0 and azure-event-hub 1.2.1 , connect azure event hub and confluent kafka. It works fine, we can receive messages from event-hub but the value schema is always byte which make us really confused. Can you pls help us with that. Thanks a lot

the Json body:

```json
{
  "name": "eventhub_to_kafka_pullt12",
  "config": {
    "confluent. topic. bootstrap. servers": "broker:29092",
    "connector .class": "io.confluent.connect.azure.eventhubs.EventHubsSourceConnector",
    "kafka.topic": "evenhubt5",
    "tasks.max": "1",
    "max.events": "10",
    "azure.eventhubs.sas.keyname": "xxx",
    "azure.eventhubs.sas.key": "xxx",
    "azure.eventhubs.namespace": "xxx",
    "azure.eventhubs.hub.name": "xxx",
    "offsets.topic.replication.factor": "1",
    "confluent.license.topic.replication.factor": "1",
    "transaction.state.log.replication.factor": "1",
    "key.converter": "org.apache.kafka.connect.storage.StringConverter",
    "value.converter.schema.registry.url": "http://xxxx:8081",
    "value.converter": "io.confluent.connect.avro.AvroConverter",
    "transaction.state.log.replication.factor": "1"
  }
}

```

the error:

 ![Capture](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/2X/8/8041089c2c0de6b0d2d750b886b9c174edb9c017.png)

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [20 October 2021 09:05 UTC](https://forum.confluent.io/t/confluent-azure-event-hub-source-connector-show-bytes-in-value-schema/3143/2 "2021-10-20T09:05:55Z")

</div>

The [docs](https://docs.confluent.io/kafka-connect-azure-event-hubs/current/overview.html) don’t seem to elaborate a great deal here. I’ve not worked with EventHubs but in integrations from similar upstream sources (messaging systems) e.g. ActiveMQ and IBM MQ I’ve used the `org.apache.kafka.connect.converters.ByteArrayConverter`, which might be what you need to do here.

The nuance is that the payload from a messaging system doesn’t necessarily have a schema as interpreted by the converter - it might just take it as a lump of data, a chunk of bytes. Once you’ve got those bytes you can infer / apply the schema that you know exists.

Here’s a couple of examples to check:

- [Streaming messages from RabbitMQ into Kafka with Kafka Connect](https://rmoff.net/2020/01/08/streaming-messages-from-rabbitmq-into-kafka-with-kafka-connect/)
- [Streaming XML messages from IBM MQ into Kafka into MongoDB](https://rmoff.net/2020/10/05/streaming-xml-messages-from-ibm-mq-into-kafka-into-mongodb/)

---

<div class="post-metadata">

**Author:** ![riferrei](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/riferrei/32/1848_2.png) [@riferrei](https://forum.confluent.io/u/riferrei)\
**Post date:** [20 October 2021 14:13 UTC](https://forum.confluent.io/t/confluent-azure-event-hub-source-connector-show-bytes-in-value-schema/3143/3 "2021-10-20T14:13:19Z")

</div>

It is pointless to set the value `io.confluent.connect.avro.AvroConverter` to the property `value.converter` if the producer of the records doesn’t store the schema along with the record during transmission. What Kafka receives **will always be bytes** since there is no tangible way for the source connector (which, remember, acts kind of like a Kafka consumer for the source system) to retrieve the schema from the record and perform deserialization.

Without knowing much about this connector (its source-code is private and not available publicly on GitHub) I would say that it needs to have a schema in order to be able to invoke the `toConnectData()` method from the Converter implementation.

— @riferrei

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [19 November 2021 14:13 UTC](https://forum.confluent.io/t/confluent-azure-event-hub-source-connector-show-bytes-in-value-schema/3143/4 "2021-11-19T14:13:35Z")

</div>

Closed on 19 November 2021 14:13 UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
