Stop consume message for Stream listener

You can do it using the actuator (see Binding Visualization and Control). Or you can invoke the endpoint programmatically. @SpringBootApplication @EnableBinding(Sink.class) public class So58795176Application { public static void main(String[] args) { SpringApplication.run(So58795176Application.class, args); } @StreamListener(Sink.INPUT) public void listen(String in) { System.out.println(); } @Autowired BindingsEndpoint endpoint; @Bean public ApplicationRunner runner() { return args -> { System.in.read(); … Read more

Can i add topics to my @kafkalistener at runtime

No; the property is evaluated once, during initialization. You cannot add topics to an existing listener container at runtime. You can, however, make your listener bean a prototype bean and create a new container each time you want to listen to new topics. Here’s an example: @SpringBootApplication public class So68744775Application { public static void main(String[] … Read more