Telegraf is very slow reading data from Kafka

I am using telegraf for high volume data transmission(atleast 25k records/sec) from kafka to influxdb in real-time. But with the best agent configuration I telegraf could read only 500 records/sec. On the other hand a simple python program could read about 3000 rec/s from the same kafka consumer. Is it advisable to use telegraf to such high volume data? or Is anything wrong with my telegraf configuration?

Telegraf.config

[[outputs.discard]] # Made to discard output to check speed of input.

[agent]
metric_batch_size = 10000
flush_interval = “1s”
interval = “1s”

[[inputs.kafka_consumer]]
name_override = “data_ingestion”
brokers = [“msgbus:9093”]
topics = [“a_di_es_5”]
max_undelivered_messages = 5000
#metric_buffer_limit = 10000
consumer_group = “test4”
offset = “oldest”
max_message_len = 1000000
json_string_fields = [“Column_1”, “Column_2”,…]
data_format = “json”

Set max_undelivered_messages to about 1.5 times the metric_batch_size, you probably want to reduce both of these to about 1000 as well as they make up the number of “in flight” metrics.