7
Views
1
Comments
Solved
Running Kafka and How to Stop it
Application Type
Traditional Web
Platform Version
10.0.1102.1

Hi there,

I have created a Java Extension to consume Kafka message. The pseudocode is like this:

while(is_true){

message = consumer.poll();

process(message);

}

In Java Extension it is put in static method of a class.

My questions are:

1. Where should i put it - as i ask here before that this looping cannot run forever as the server action will be kicked by the application server?

2. If i use another thread to stop that pooling, how to do it?

thanks and regards,



Rank: #223
Solution

Static class variable, Ctrl-Z, but it is better to manage using BPT.

regards