[WIP] Add Kafka invoke type for Go functions#3923
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aliok The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
b2688f4 to
f6b4c65
Compare
|
@aliok: The following test failed, say
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
WIP until knative-extensions/func-go#169 is merged
Summary
kafkaas a new invoke type for Go functionstemplates/go/.instanced-kafka/,templates/go/kafka/)knative.dev/func-go/kafkaInstancedKafkaandStaticKafkasignature detection inpkg/scaffolding/signatures.goinvoke: kafkainfunc.yamlHow it works
The Kafka middleware connects directly to Kafka brokers as a consumer group
member — no Knative Eventing or CloudEvents required. The function receives
raw
kafka.Messagestructs (key, value, headers as[]byte).Configuration is done via environment variables (
KAFKA_BROKERS,KAFKA_TOPICS,KAFKA_CONSUMER_GROUP), which can be set as plain values,from Kubernetes Secrets, or from ConfigMaps using the existing
func.yamlenvs syntax:
Delivery semantics
Dependencies
go.modfiles referenceknative.dev/func-go v0.21.3which will need a version bump once func-go is released with the kafka packageLimitations