bug: impossible to trigger more than one lambda via Kafka topics #10752
Labels
aws:kafka
Amazon Managed Streaming for Apache Kafka
aws:lambda
AWS Lambda
status: backlog
Triaged but not yet being worked on
type: bug
Bug report
Is there an existing issue for this?
Current Behavior
I have defined a Kafka cluster in localstack using your documentation, I have created 2 topics and I have deployed 2 lambda's. Lambda 1 has as event source topic 1 and lambda 2 has as event source lambda 2.
If I send in a event via topic 1, lambda 1 is triggered but this doesn't work for topic2/lambda2, nothing happens (though the topic registers the event just fine).
If I first create the event mapping between lambda 2 and topic 2, then it works for lambda 2 but not for lambda 1. So the order of event mapping is crucial.
Expected Behavior
I expect that topic 1 triggers lambda 1 and topic 2 triggers lambda 2
How are you starting LocalStack?
With a docker-compose file
Steps To Reproduce
docker-compose.yml:
brokernodegroupinfo.json:
Environment
Anything else?
We have noticed in the localstack container output that the message regarding. the polling thread only appears during the creation of the first mapping and not during the second:
localstack_product_master_consumer | 2024-04-30T07:45:30.130 DEBUG --- [ asgi_gw_6] l.s.l.e.kafka_event_source : Starting Kafka message polling thread for Lambda API
localstack_product_master_consumer | 2024-04-30T07:45:30.596 WARN --- [ Thread-120] kafka.coordinator.consumer : group_id is None: disabling auto-commit.
localstack_product_master_consumer | 2024-04-30T07:45:31.707 INFO --- [ asgi_gw_6] localstack.request.aws : AWS lambda.CreateEventSourceMapping => 202
localstack_product_master_consumer | 2024-04-30T07:46:02.988 INFO --- [ asgi_gw_2] localstack.request.aws : AWS lambda.CreateEventSourceMapping => 202
The text was updated successfully, but these errors were encountered: