Hi Sam,

Thanks for your quick answer.

We are passing “offsets.storage = kafka” to clj.kafka.consumer.zk/consumer (
https://github.com/pingles/clj-kafka/blob/master/src/clj_kafka/consumer/zk.clj#L24
)

I would expect then that offsets would be stored in both Kafka and ZK
(according to Kafka documentation, dual.commit.enabled = true by default
when offsets.storage = kafka), based on Apache documentation and also this
thread:
https://mail-archives.apache.org/mod_mbox/kafka-users/201502.mbox/%3ccaa+bczra85-ffr7g4lkyxfoimyd9rkzbom1dbhmzucxufd3...@mail.gmail.com%3E

I talked to our devops team and we didn’t do any migration on ZK directly.
According to them the steps we followed were:
- Added new nodes to the kafka cluster (using backward compatible inter
broker message protocol)
- Migrated the data using kafka-reassign-partitions tool  (
https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools)
- Stop old brokers

So at this point I wonder if the problem was these dual commits to ZK and,
if we didn’t have them and we were storing the offsets in Kafka only,
migrating the corresponding topic would have been enough to have the
offsets in the new brokers and apps would keep consuming normally from that
point on.

-- 
Javier Holguera
Sent with Airmail

On 16 August 2016 at 12:34:19, Sam Pegler (sam.peg...@infectiousmedia.com)
wrote:

clj-kafka uses the old consumer API's and offset storage in ZK. If I were
you I'd migrate to https://github.com/weftio/gregor which wraps the new
consumer API and stores offsets in Kafka.

I'm going to assume you didn't migrate ZK state based off this?

__


On 16 August 2016 at 12:15, Javier Holguera <
javier.holgu...@fundingcircle.com> wrote:

> Hi,
>
> Yesterday my company completed a “successful” migration from Kafka
brokers
> v0.9.0.1 to Kafka 0.10.0.
>
> However the migration can’t be considered completely successfully because
> we accidentally lost our offsets. Fortunately our apps are designed to be
> able to replay from the beginning on the topic without much problem, but
> it’s something we weren’t expecting and I would like to understand what
we
> did wrong to let his happen.
>
> Our apps use kafka client v0.8.2.1 wrapped around latest version of
> clj-kafka. We are using its functionality to commit offsets (like here:
> https://github.com/pingles/clj-kafka/blob/master/src/clj_
> kafka/offset.clj#L70)
> using OffsetCommitRequest.
>
> Any help would be welcomed.
>
> Thanks!
>
> --
> Javier Holguera
> Sent with Airmail
>

Reply via email to