nicolaferraro commented on a change in pull request #152: Knative related 
improvements
URL: https://github.com/apache/camel-k-runtime/pull/152#discussion_r333773385
 
 

 ##########
 File path: 
camel-knative/src/main/java/org/apache/camel/component/knative/KnativeEndpoint.java
 ##########
 @@ -93,17 +96,19 @@ public KnativeComponent getComponent() {
 
     @Override
     public Producer createProducer() throws Exception {
-        final String version = configuration.getCloudEventsSpecVersion();
-        final Processor ceProcessor = 
CloudEventsProcessors.forSpecversion(version).producerProcessor(this);
+        if (type == Knative.Type.event) {
+            throw new UnsupportedOperationException("knative `events` are 
supported only as consumer");
 
 Review comment:
   No.. producer side the event type can be used to set the value of the 
`ce-type` header (when not overridden by the route headers).
   
   I'm just thinking a possible way to define it..
   
   ```
   .to('knative:event/chuck')
   ```
   
   Semantically may mean "transform the exchange into a chuck event and emit 
it".
   
   Destination is always the "default" broker unless overridden. So we may 
expect at runtime level that the operator will inject the destination into the 
KNATIVE config and we need to look it up here (by type and name, where name is 
default if not overridden).
   
   

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


With regards,
Apache Git Services

Reply via email to