Skip to content

receiver/kafka: Improve performance and Kafka feature support #40628

@marclop

Description

@marclop

Component(s)

receiver/kafka

Is your feature request related to a problem? Please describe.

The current kafka receiver doesn't have the best performance, particularly when message marking is set, the performance is 4-5 times slower than when auto commit is enabled, looking at the implementation, this could be due to the interfaces exposed by the Sarama consumer. There are other Kafka Go clients that have increasingly more adoption and KIP support, like franz-go.

Additionally, the current Kafka receiver doesn't support consuming from a regex expression, forcing users with multi-tenant or multi-topic architectures to use the kafkatopicsobserver receiver creator, which creates 1 sarama Kafka client per topic (forcing 1 connection per client * number of brokers * topics, potentially more if there are more than 1 partition and client per topic).

Describe the solution you'd like

I'd like to propose that we consider opt-in support for franz-go, similar to #40364. Switching will improve performance and also add support for consuming from regex expressions, eliminating the need to use kafkatopicsobserver.

Describe alternatives you've considered

librdkafka uses cgo, which is undersireable for performance and allocations.

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions