omarsmak commented on pull request #1052:
URL: 
https://github.com/apache/camel-kafka-connector/pull/1052#issuecomment-784179779


   > I do agree that none of the components know about Kafka Connect Struct but 
there's no assurance that a Map is any better so we are just making things a 
little bit more unpredictable because it will depend on the specific component.
   
   The thing is, `Struct` itself is a decorated Map with the schema support. I 
understand your concern here but if you want produce data as Map in Kafka 
Connect, Kafka Connect side of things has only two options, either go with Map 
or go with Struct in case you want to preserve the schema information, 
AvroConverter and JsonConverter will produce for you Structs in case the schema 
information are needed in downstream sinks. However, in our case, Camel 
components side of things, we don't acknowledge Structs at all and hence, 
propagating struct vs map downstream has the same effect on downstream 
component, e.g: If the component expects a String but instead got a Map or 
Struct. 
   However, I'd agree this should be an SMT in case we know there are Camel 
components that expect Struct but none need that, and hence I couldn't convince 
myself to ask the user to include a Struct->Map SMT for something we don't even 
support downstream and hence I just wanted to be automatically converted. 
   
   


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

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


Reply via email to