Sobes.tech

public static void a(long item) { b(item); System.out.println(item); } public static void b(long item) { c(item); } public static void c(long item) { d(item); } public static void d(long item) { System.out.println(item); item = 20L; // here }

157

class Task { private static int counter = 0; public static void main(String[] args) throws Exception { var thread1 = new Thread(() -> increase()); var thread2 = new Thread(() -> increase()); thread1.start(); thread2.start(); thread1.join(); thread2.join(); System.out.println(counter); } private static void increase() { for (int i = 0; i < 5000; i++) { counter++; } } }

152

[name] asked: If the topic has 100 partitions and the @KafkaListener annotation specifies concurrency=10, will 90 partitions be idle?

146
/3