Skip to content

enable.auto.commit: false and commit() #17

@killfill

Description

@killfill

Hi!

I was trying to explicit use commit(), like this:

var stream = consumer.getReadStream(config.kafka_topic, {
    fetchSize: 10
});

stream.on('data', msgs => {

    msgs.map(msg => {

        console.log('commiting...')
        consumer.commit(msg, err => {
            console.log('   commited!', err)
        })

    })
})

Noticed that the 'commited' callback, takes quite some time to be called (2-3 seconds for each one of them)

Is it correct to send commits like this?
Is so, why would it be so slow?

Thanks!!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions