Spring Integration Kafka消费者的倒带偏移量

时间:2016-06-30 04:29:43

标签: spring spring-integration apache-kafka

有没有办法使用spring-integration-kafka来回放Kafka消费者的偏移量?我想要一些可以与kafka控制台消费者脚本一起使用的--from-beginning选项。

我的消费者配置如下所示:

<bean id="consumerProperties"
    class="org.springframework.beans.factory.config.PropertiesFactoryBean">
    <property name="properties">
        <props>
            <prop key="auto.offset.reset">smallest</prop>
            <prop key="socket.receive.buffer.bytes">10485760</prop> <!-- 10M -->
            <prop key="fetch.message.max.bytes">5242880</prop>
            <prop key="auto.commit.interval.ms">1000</prop>
        </props>
    </property>
</bean>

2 个答案:

答案 0 :(得分:2)

答案 1 :(得分:0)

auto.offset.reset应为:最早,最新或无