Skip to content

UserError: Out of bounds when consuming messages #120

@xxzefgh

Description

@xxzefgh

Follow-up to #110

I copied message schema and partitions count from our prod instance where error happens consistently, not sure if that has anything to do with the bug though.

Repo: https://github.com/mbrunjadze-crocobet/platformatic-kafka-out-of-bounds-bug

Error:

node:internal/modules/run_main:123
    triggerUncaughtException(
    ^

UserError: Out of bounds.
    at DynamicBuffer.slice (file:///platformatic-kafka-out-of-bounds-bug/node_modules/@platformatic/kafka/dist/protocol/dynamic-buffer.js:96:19)
    at Reader.readVarIntBytes (file:///platformatic-kafka-out-of-bounds-bug/node_modules/@platformatic/kafka/dist/protocol/reader.js:215:35)
    at readRecord (file:///platformatic-kafka-out-of-bounds-bug/node_modules/@platformatic/kafka/dist/protocol/records.js:57:23)
    at readRecordsBatch (file:///platformatic-kafka-out-of-bounds-bug/node_modules/@platformatic/kafka/dist/protocol/records.js:149:28)
    at file:///platformatic-kafka-out-of-bounds-bug/node_modules/@platformatic/kafka/dist/apis/consumer/fetch-v17.js:111:52
    at Reader.readNullableArray (file:///platformatic-kafka-out-of-bounds-bug/node_modules/@platformatic/kafka/dist/protocol/reader.js:236:24)
    at Reader.readArray (file:///platformatic-kafka-out-of-bounds-bug/node_modules/@platformatic/kafka/dist/protocol/reader.js:269:21)
    at file:///platformatic-kafka-out-of-bounds-bug/node_modules/@platformatic/kafka/dist/apis/consumer/fetch-v17.js:87:31
    at Reader.readNullableArray (file:///platformatic-kafka-out-of-bounds-bug/node_modules/@platformatic/kafka/dist/protocol/reader.js:236:24)
    at Reader.readArray (file:///platformatic-kafka-out-of-bounds-bug/node_modules/@platformatic/kafka/dist/protocol/reader.js:269:21) {
  code: 'PLT_KFK_USER',
  canRetry: false
}

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