I have a business requirement where the order of Kafka message needs to maintain. My microservices uses pull ordered Kafka mechanism to achieve this. But I am seeing slowness issue with the mechanism as it processes each message one by one from total 512 partitions.
So, at a time only 512 messages are getting processed which increases Kafka lag on this topic up to millions as upstream system keeps on pushing load on my microservice.
We are using sarama(https://github.com/Shopify/sarama) library to leverage Kafka functionality,
I tried increasing number of goroutines to process messages parallelly but that didn't help in pull ordered mechanism. Batch processing can be another option but would not work in my scenario as every message goes through five different components and then it will be committed successfully.
Any help/leads for this problem will be really appreciated!