// Do not edit directly!
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
[id="extensions-knative"]
= Knative
:linkattrs:
:cq-artifact-id: camel-quarkus-knative
:cq-native-supported: true
:cq-status: Stable
:cq-status-deprecation: Stable
:cq-description: Send and receive events from Knative.
:cq-deprecated: false
:cq-jvm-since: 2.14.0
:cq-native-since: 2.14.0

ifeval::[{doc-show-badges} == true]
[.badges]
[.badge-key]##JVM since##[.badge-supported]##2.14.0## [.badge-key]##Native since##[.badge-supported]##2.14.0##
endif::[]

Send and receive events from Knative.

[id="extensions-knative-whats-inside"]
== What's inside

* xref:{cq-camel-components}::knative-component.adoc[Knative component], URI syntax: `knative:type/typeId`

Please refer to the above link for usage and configuration details.

[id="extensions-knative-maven-coordinates"]
== Maven coordinates

https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-knative[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"]

Or add the coordinates to your existing project:

[source,xml]
----
<dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifactId>camel-quarkus-knative</artifactId>
</dependency>
----
ifeval::[{doc-show-user-guide-link} == true]
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
endif::[]

[id="extensions-knative-camel-quarkus-limitations"]
== Camel Quarkus limitations

[id="extensions-knative-limitations-vertx-websocket-with-knative-does-not-work-with-http-2"]
=== vertx-websocket with Knative does not work with HTTP/2

The xref:reference/extensions/vertx-websocket.adoc[vertx-websocket] extension is supported with Knative, but has important protocol compatibility constraints.

WebSocket connections require the HTTP/1.1 upgrade mechanism and are incompatible with HTTP/2. If your Knative application is intended to accept WebSocket connections, it **must not** allow negotiating the HTTP/2 protocol, or else clients will fail to upgrade to the WebSocket protocol.

This creates an incompatibility with the xref:reference/extensions/grpc.adoc[grpc] extension, which requires HTTP/2.

NOTE: If you need to use gRPC with Knative, you must configure HTTP/2 support.
ifeval::[{doc-show-advanced-features} == true]
See https://docs.redhat.com/en/documentation/red_hat_openshift_serverless/1.31/html/serving/external-and-ingress-routing#using-http2-gRPC_kourier-gateway-service-type[Using HTTP2 and gRPC] for configuration instructions.
endif::[]
ifeval::[{doc-show-advanced-features} == false]
Refer to your platform's Knative documentation for configuration instructions.
endif::[]

To use WebSockets with Knative:

* Ensure your Knative service does not negotiate HTTP/2
* Configure ingress gateways and load balancers to use HTTP/1.1 for WebSocket routes
* Do not enable HTTP/2 support if your application accepts WebSocket connections

For platform-specific configuration, refer to:

ifeval::[{doc-show-advanced-features} == true]
* https://docs.openshift.com/container-platform/4.15/networking/ingress-operator.html[OpenShift Ingress Operator documentation]
endif::[]
ifeval::[{doc-show-advanced-features} == false]
* https://kubernetes.io/docs/concepts/services-networking/ingress/[Kubernetes Ingress documentation]
* https://knative.dev/docs/serving/services/configure-requests/#protocol-selection[Knative protocol selection documentation]
endif::[]

