Forum Discussion

Prabaharan's avatar
Prabaharan
Contributor
6 years ago
Solved

Need groovy script to read messages from kafka topic

Hi Team,

 

I have written code in groovy script test step to post messages in kafka topic. Now I'm trying to read messages from the kafka topic. All the code samples in online have an infinite loop in it inorder to read messages from kafka topic. But I would need a groovy code to read kafka messages and the test step should exit once all the messages are read, i.e.., it should not have an infinite loop.

Appreciate if anyone can help me in resolving this.