I recently wanted to add a new behavior in my project that uses spring-kafka. The idea is really simple : App1 create a new scenario name “SCENARIO_1” and publish this string in the topic “NEW_SCENARIO” App1 publish some message on topic “APP2-SCENARIO_1” and “APP3-SCENARIO_1” App2 (group-id=app2) listens on NEW_SCENARIO and creates a new consumer<Object,String> listening on a new topic “APP2-SCENARIO_1”
I am going through Java 8 Feature and using Jshell to explore it. I tried to run the below command: But it failed with the below error: I didn’t get exactly what’s the issue Consumer takes one argument and return nothing. Same I am doing here by passing 1 arg str and printing. So what’s the issue with this syntax.