Comments (9)
@ricardozanini After taking a closer look, in order all connector to behave similarly, it would be good for HTTP Connector, following the metadata approach implemented in other connectors, to generate metadata that implements CloudEventMetadata.
from quarkus-reactive-messaging-http.
We might consider supporting CE SDK in this extension. @cescoffier thoughts?
from quarkus-reactive-messaging-http.
We tried to use the CE SDK a long time ago in other connectors. We decided to go without it as it brought lots of complexity (dependencies and co).
from quarkus-reactive-messaging-http.
@cescoffier Thanks for quick response. What are you using to support CloudEvent binary in other connectors?
from quarkus-reactive-messaging-http.
We do the work ourselves. It's straightforward.
Here is the example for Kafka:
https://github.com/smallrye/smallrye-reactive-messaging/blob/main/smallrye-reactive-messaging-kafka/src/main/java/io/smallrye/reactive/messaging/kafka/impl/ce/KafkaCloudEventHelper.java.
We have the same for AMQP 1.0.
Note that the Cloud Event metadata is attached to the message metadata.
from quarkus-reactive-messaging-http.
@cescoffier
Ok, makes sense.
I was currently reviewing the code and considering not doing anything in the extension, since for HTTP the headers are already available in the IncomingHttpMetadata
@MarianMacik @ricardozanini I think this issue can be closed. It is kogito responsibility to process the headers in the attached metadata to build the cloud event.
from quarkus-reactive-messaging-http.
My idea was to add CE in this extension since others might find it useful. It's messaging after all and its highly related to Knative, which transports CE over HTTP.
We can control the CE support via properties, so users might optionally switch on or off.
I'd leverage the same approach @cescoffier pointed for the others extensions rather than the SDK. @cescoffier I agree that the SDK was somewhat complicated in the past, but today it's pretty consolidated, they even have examples using Quarkus. Worth taking a look.
from quarkus-reactive-messaging-http.
@ricardozanini As @cescoffier shown, other connectors are providing cloud event attributes through Message metadata. In order to to do that, SDK is not useful, but a nuissance. It would be different if the Message payload provided by the connector is expected to be a CloudEvent. Changing http connector to send cloudevents in the Message palyload will make it diverge from other connectors and I do not think we want to do that.
On the other hand, it would be nice if other connectors can be configured to return CloudEvent (no matter if binary or structure) in the payload, making the consumer of those events ignorant of the underlying cloud event format ( I mean binary or structure) used (but Im not sure if this is feasible, probably not)
from quarkus-reactive-messaging-http.
Created PR #80
from quarkus-reactive-messaging-http.
Related Issues (17)
- How can I set Connection Timeout & Read Timeout ?
- Add support to Quarkus 3
- Upgrade release.yml to using Environment Files.
- List configuration properties on the pages
- ce_time header is not following RFC-3339 when seconds are 0 HOT 4
- All contributors HOT 2
- move native test from quarkus core repository HOT 1
- move quickstart and guide from quarkusio org
- "Unable to find matching target resource method" in native mode for incoming channel HOT 1
- provide support for broadcast on incoming channel HOT 1
- move issues from quarkus core repo and remove the extension there
- Reactive Messaging WebSockets connector - exception thrown on close
- Reactive HTTP and WebSocket connector enhancements
- Use -DnoCode instead of -DnoExamples and add resteasy-reactive extension in the guides HOT 1
- HTTP and CloudEvent headers cannot be set outgoing
- Incompatibility in Jandex version 3 and 2.x HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quarkus-reactive-messaging-http.