You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2019/12/10 17:30:23 UTC

[GitHub] [camel-kafka-connector] omarsmak opened a new pull request #34: Support camel type converter

omarsmak opened a new pull request #34: Support camel type converter
URL: https://github.com/apache/camel-kafka-connector/pull/34
 
 
   This shall address #16. It will initialize the default Camel type registry upon starting the connector. To use it, you can add the following to the `.properties` file as an example:
   ```
   transforms=CamelTypeConverterTransformer
   transforms.CamelTypeConverterTransformer.type=org.apache.camel.kafkaconnector.transforms.CamelTypeConverterTransform$Value
   transforms.CamelTypeConverterTransformer.target.type = java.lang.Float
   ```
   Whereby you can change `org.apache.camel.kafkaconnector.transforms.CamelTypeConverterTransform$Value` to convert the value of a connect record with `org.apache.camel.kafkaconnector.transforms.CamelTypeConverterTransform$Key` to convert the key of a connect record. 
   `target.type` is the full qualified java name for the type you want to convert to. 
   
   This transformer will try its best to populate the correct schema for the corresponding type. However, in case the type of the value is unknown, it will by default included it as `BYTES` schema. 
   
   P/S: There are maybe some checkstyle errors as I think the checksyle profile is not included yet? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services