I read all the documentation of Camel Kafka and the only approach I read is this one from git and the route builder that specifies
public void configure() throws Exception {
from("kafka:" + TOPIC
+ "?groupId=A"
+ "&autoOffsetReset=earliest" // Ask to start from the beginning if we have unknown offset
+ "&consumersCount=2" // We have 2 partitions, we want 1 consumer per partition
+ "&offsetRepository=#offset") // Keep the offset in our repository
.to("mock:result");
}
But for order for the Clients I need to use the Spring so my endpoint for kafka is this
<!--DEFINE KAFKA'S TOPCIS AS ENDPOINT-->
<endpoint id="tagBlink" uri="kafka:10.0.0.165:9092">
<property key="topic" value="tagBlink"/>
<property key="brokers" value="10.0.0.165:9092"/>
<property key="offsetRepository" value="100"/>
</endpoint>
But getting an exception
Could not find a suitable setter for property: offsetRepository as there isn't a setter method with same type: java.lang.String nor type conversion possible: No type converter available to convert from type: java.lang.String to the required type: org.apache.camel.spi.StateRepository with value 100
Is this possible with my current configuration? How can I resume from an specific offset? ?