Skip to content

Enable back pressure for KafkaConsumer #131

Closed
@blindspotbounty

Description

@blindspotbounty

We performed some basic tests for consumer but with big number of records >11M

for try await record in consumer.messages {
    i = record.offset
    ctr += 1

    if ctr % 1000 == 0 {
        print("read up to \(i), ctr: \(ctr)")
    }
}

Unfortunately, without back pressure it leads to memory growth. For simplicity attaching screenshot:
memgrow

At some point, when all entries are read from kafka, memory usage is declining but would be nice if it would be possible to limit it with configuration (e.g. NIO HighLow watermark backpressure strategy).

PS: it seems that back pressure was removed around here #66

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions