Sarama: How to get message from beginning?

Created on 26 Dec 2016  ·  1Comment  ·  Source: Shopify/sarama

Versions

Sarama Version: I didn't fiugre out where to check Sarama version
Kafka Version: kafka_2.11-0.8.2.1
Go Version:1.5

Configuration

auto.offset.reset=smallest

Problem Description

I want to know: with go_kafka_client, I want to get message from kafka from beginning just like --from-beginning param of kafka-console-consumer.sh; How can I set the consumer.conf to make it?

consumer question

Most helpful comment

In Sarama you need to set the Consumer.Offsets.Initial value to OffsetOldest, but if you have a separate consumer.conf file it sounds like you may not be using Sarama at all. Are you sure you're not using some different library?

>All comments

In Sarama you need to set the Consumer.Offsets.Initial value to OffsetOldest, but if you have a separate consumer.conf file it sounds like you may not be using Sarama at all. Are you sure you're not using some different library?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qiuyesuifeng picture qiuyesuifeng  ·  3Comments

danpmx picture danpmx  ·  7Comments

damiannolan picture damiannolan  ·  4Comments

ruixule picture ruixule  ·  5Comments

thomaslee picture thomaslee  ·  7Comments