This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 943d4a0a7ea Improving knative documentation for ProducerTemplate usage 
(#8403)
943d4a0a7ea is described below

commit 943d4a0a7ea9de11128741f8f0b6ada25ab2cf7c
Author: Zineb BENDHIBA <bendhiba.zi...@gmail.com>
AuthorDate: Wed Sep 21 16:39:41 2022 +0200

    Improving knative documentation for ProducerTemplate usage (#8403)
---
 .../src/main/docs/knative-component.adoc                       | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git 
a/components/camel-knative/camel-knative-component/src/main/docs/knative-component.adoc
 
b/components/camel-knative/camel-knative-component/src/main/docs/knative-component.adoc
index fca9a1d2b84..bdb898b1ecc 100644
--- 
a/components/camel-knative/camel-knative-component/src/main/docs/knative-component.adoc
+++ 
b/components/camel-knative/camel-knative-component/src/main/docs/knative-component.adoc
@@ -167,3 +167,13 @@ public interface KnativeTransport extends Service {
         KnativeEnvironment.KnativeServiceDefinition service, Processor 
processor);
 }
 ----
+
+== Using ProducerTemplate
+When using Knative producer with a ProducerTemplate, it is necessary to 
specify a value for the CloudEvent source, simply by setting a value for the 
header 'CamelCloudEventSource'.
+
+=== Example
+
+[source,java]
+----
+producerTemplate.sendBodyAndHeader("knative:event/broker-test", body, 
CloudEvent.CAMEL_CLOUD_EVENT_SOURCE, "my-source-name");
+----
\ No newline at end of file

Reply via email to