vmware-archive / kafka-trigger

Kubernetes CRD controller for Kafka topic as event source for Kubeless functions
Apache License 2.0
28 stars 34 forks source link

make topic metadata available to functions #40

Open uedun opened 3 years ago

uedun commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST?: Feature request What happened: We have a use case for certain parameters like partitions, offset, keys that are not available in the events object for consumption by functions What you expected to happen: Make those parameters available to the functions since they are already present in the controller How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?: I have a working fork that we use internally and would be happy to contribute this if it is a desired feature.

Environment:

sepetrov commented 3 years ago

I also think this is valuable information, especially for cases where a function cannot handle the message for some reason. How do you suggest making this information available to the handler? What I had in mind is using the request headers, like in here.

uedun commented 3 years ago

I also think this is valuable information, especially for cases where a function cannot handle the message for some reason. How do you suggest making this information available to the handler? What I had in mind is using the request headers, like in here.

This is exactly what I have done. Here is a PR