You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "jakubmalek (via GitHub)" <gi...@apache.org> on 2023/07/18 16:36:38 UTC

[GitHub] [camel-kafka-connector] jakubmalek commented on issue #1543: CamelPostgresqlsourceSourceConnector publishes InputStreamCache object reference to topic

jakubmalek commented on issue #1543:
URL: https://github.com/apache/camel-kafka-connector/issues/1543#issuecomment-1640563686

   Hi, 
   I faced the same issue with `camel-http-secured-source-kafka-connector` the task is returning `InputStreamCache` object as the  `SourceRecord` value, which cannot be converted with `ByteArrayConverter`.
   
   Disabling streaming cache with `camel.main.streamCachingEnabled` property changes the java-type to `org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream` which is not suitable either.
   
   When combined with `camel.source.marshal: jackson` I get following error:
   > com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.apache.camel.converter.stream.InputStreamCache and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)
   
   I tried looking for suitable [camel-http](https://github.com/apache/camel/blob/main/components/camel-http/src/generated/resources/org/apache/camel/component/http/https.json) properties but I couldn't find anything.
   
   For now I've bypassed this by implementing custom transformation plugin which transforms the `InputStream` into the byte array.
   However I was wondering if there a way to configure the connector to at the very least returned unwrapped bytes or preferably being able to convert it to  `HashMap` for the `JSON` payload to be able to apply further field transformations ?
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org