Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MGDCTRS-2214: Use Kamelet data types #644

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christophd
Copy link

  • Replaces encoder/decoder Kamelet actions with single data-type Kamelet action
  • Add DataType converter implementations for application/octet-stream, avro/binary, avro/x-struct, application/x-struct, application/x-java-object, application/json, plain/text mime types
  • Use avro/x-struct instead of avro/binary as a consumes mime type
  • Use single delegating schema resolver to handle both Avro and Json schema resolver based on given mime type
  • Introduce cos-resolve-schema-action.kamelet.yaml and cos-data-type-action.kamelet.yaml (replaces endocer/decoder action Kamelets)
  • Use cos-resolve-schema-action and cos-data-type-action Kamelets in KameletBindings as a generic way of converting data formats based on produces/consumes mime type information given on the connector metadata and datashape settings

The basic idea or this PR is to use generic cos-data-type-action Kamelet in order to transform message payloads from/to different data formats. The data format information is given as consumes/produces mime type information on the connector. This mime type data shape information is translated to a data type converter implementation located in either the cos-connector-kamelets-serdes module or the connector implementation itself.

Some data formats require schema resolving (e.g. avro and json based format). This is why the KameletBinding also uses a generic cos-resolve-schema-action Kamelet that performs schema resolving based on additional contentClass and mime type information given on the connector.

- Replaces encoder/decoder Kamelet actions with single data-type Kamelet action
- Add DataType converter implementations for application/octet-stream, avro/binary, avro/x-struct, application/x-struct, application/x-java-object, application/json, plain/text mime types
- Use avro/x-struct instead of avro/binary as a consumes mime type
- Use single delegating schema resolver to handle both Avro and Json schema resolver based on given mime type
- Introduce cos-resolve-schema-action.kamelet.yaml and cos-data-type-action.kamelet.yaml (replaces endocer/decoder action Kamelets)
- Use cos-resolve-schema-action and cos-data-type-action Kamelets in KameletBindings as a generic way of converting data formats based on produces/consumes mime type information given on the connector metadata and datashape settings
@christophd
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant