Closed lunarray closed 4 years ago
@andresmgot I put up a merge request to add this support. I'm happy to talk through alternatives, but for now I've extended the request headers to include the event-topic
which triggered a given function. This will address this requested functionality, and my team also has an immediate need for this in our platform.
I've released https://github.com/kubeless/kafka-trigger/releases/tag/v1.0.4 with this, thanks!
@andresmgot awesome! Thank you.
@lunarray so you should now be able to access the event-topic
like so:
def forward(event, context):
topic = event['extensions']['request'].get_header('event-topic')
FEATURE REQUEST:
What happened: Currently inside the kubeless handler function triggered by kafka trigger, we got two argument passed which is event and context. Inside both event and context there is no way to know what topic fired this event.
What you expected to happen: There is a way to get the subscribed topic name passed to either context or event. Like maybe:
Environment:
kubectl version
):