Knative gRPC Support
Requirement
As an integration engineer orchestrating the message flow of ~50 different services, I'd like to be able to configure Camel-K to publish to Knative Services using gRPC.
Problem
As I understand it, Camel-K only supports HTTP for Knative Services:
As today the Knative component only supports http as transport as this is the only supported protocol on Knative side. (Apache Camel Docs)
Proposal
Since Knative has their own documentation stating gRPC is possible for a Knative Service, I think it would be valuable to add built-in support for gRPC in the Knative component.
Open questions
Is there currently a workaround that allows me to use gRPC rather than HTTP for the Knative endpoint?
Thanks for reporting. I don't think there is any workaround for this. However you're pretty much invited to do some further analysis and any development to contribute to the feature.
@squakez
To Support this we need to add -
- A transport switch/Uri option for example transport=grpc
- A grpc client layer inside the knative component
- Message mapping
- Test and Integration to verify end to end behaviour
APIs affected
- Camel Knative (go)
- Camel Runtime Knative (java)
- grpc client (create channel + sub)
Please let me know if this is correct! And if you permit I'll like to work on this.
I had no time to look at this in deep. In general, for serverless we better start moving to KEDA adoption, and for eventing, stick to Kafka which is more "standard". Feel free to work on it, but mind that it could become a bit complicated as knative touches core parts of the project and in future 3.x version we may rework it completely. As soon as you have any specific query about it, just ping me and I'll help.
@squakez Thanks for the input! I will deeply assess the code base and figure out all the changes and prepare a proposal for you to review. Then I'll proceed with work. I'll get back to you shortly!