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

[Fix_3383] Adding binary cloud event support for outgoing messages #3386

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

fjtirado
Copy link
Contributor

@fjtirado fjtirado commented Jan 30, 2024

Knative has issues with structure event, so we are switching to binary, by defaullt, for quarkus-http connector.

This behaviour can be modified through configuration.
Users can specifiy
kogito.addon.messaging.outgoing.cloudEventMode.<channelName>=BINARY|STRUCTURED
to configure cloud event mode per outgoing channel
or just
kogito.addon.messaging.outgoing.cloudEventMode=BINARY|STRUCTURED
to set it overrall.
If nothing specified, binary is used for quarkus-http connector and structured for the others, to keep backward compatibility with existing examples using Kafka.

This requires changes on kogito-apps tests apache/incubator-kie-kogito-apps#1974 and examples apache/incubator-kie-kogito-examples#1862

Fixes #3383

@fjtirado fjtirado marked this pull request as draft January 30, 2024 21:17
@fjtirado fjtirado changed the title [Fix_3383] Do not include null values on json payload [Fix_3383] Adding binary cloud event support for outgoing messages Feb 1, 2024
@fjtirado fjtirado force-pushed the Fix_#3383 branch 2 times, most recently from ba86a44 to aa82aad Compare February 1, 2024 17:19
Copy link
Contributor

@gmunozfe gmunozfe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, coverage comment mentioned on kogito-examples review.
Great work @fjtirado !

Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine, I'm just wondering about what Matej said that CE SDK can handle the serialization for specific connectors, like HTTP and Kafka.

@fjtirado
Copy link
Contributor Author

fjtirado commented Feb 2, 2024

The code looks fine, I'm just wondering about what Matej said that CE SDK can handle the serialization for specific connectors, like HTTP and Kafka.

@ricardozanini In kogito, it was decided at the beginning to handle the serialization through custom marshallers rather than relying on connector specifics. However, if user want do to that, one of the provided marshallers is a not marshaller at all, which relies on the connector setup

@fjtirado fjtirado merged commit 99c7f5d into apache:main Feb 2, 2024
6 of 11 checks passed
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this pull request Feb 5, 2024
…pache#3386)

* [Fix_3383] Do not include null values on json payload

* Revert "[Fix_3383] Do not include null values on json payload"

This reverts commit 47b9b4d.

* [Fix_#3383] Setting metadata when using binary
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this pull request Feb 13, 2024
…pache#3386)

* [Fix_3383] Do not include null values on json payload

* Revert "[Fix_3383] Do not include null values on json payload"

This reverts commit 47b9b4d.

* [Fix_#3383] Setting metadata when using binary
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.

Infer data type when publishing cloud event
3 participants