apache / camel-kafka-connector-examples

Apache Camel Kafka Connector Examples
https://camel.apache.org
64 stars 43 forks source link

Example for minio with ByteArrayConverter #312

Closed Ihjaz closed 3 years ago

Ihjaz commented 3 years ago

Can you please add an exmaple for minio connector with ByteArrayConverter ?

I'm trying to move an image object from minio to kafka but it looks like the minio connector is consuming the object as 'STRING' and ByteArrayConecter is not able to process it.

oscerd commented 3 years ago

What version are you using?

oscerd commented 3 years ago

By the way the problem is in the camel component. We need to fix the behavior there. https://github.com/apache/camel/blob/master/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioEndpoint.java#L163

Ihjaz commented 3 years ago

What version are you using?

camel-minio-kafka-connector-0.8.0

oscerd commented 3 years ago

Needs a fix on the camel side.

oscerd commented 3 years ago

Fixed on the Camel side: https://issues.apache.org/jira/browse/CAMEL-16423

This will be in 0.7.4 or 0.10.0

Ihjaz commented 3 years ago

Thanks for the quick fix.

Can I test this fix if I build the camel-kafka-connector 0.7.4-snaphsot branch ?

oscerd commented 3 years ago

Not out of the box. You'll need to point to the snapshot and you'll need to build camel 3.7.4 snapshot too, to be sure it is aligned

Ihjaz commented 3 years ago

Camel-minio compilation failed. It seems like you have imported org.testcontainers.shaded.org.apache.commons.io.IOUtils instead of org.apache.commons.compress.utils.IOUtils.

oscerd commented 3 years ago

Fixed.

oscerd commented 3 years ago

Did you try it?

Ihjaz commented 3 years ago

I will be testing it today.

Ihjaz commented 3 years ago

I've tried it. I was able to successfully consume an image, audio and video file with org.apache.kafka.connect.converters.ByteArrayConverter.

Thanks again for the quick fix.

oscerd commented 3 years ago

Super happy to help!