Skip to content

TypeError Cannot read properties of undefined (reading 'partitionsCount') #109

@pt-nolas

Description

@pt-nolas

Hello, we are using platformatic/kafka in our project and caught one error but I am not sure why it happens.
I am sharing the stack trace and would like to hear if anyone had ever encountered this error before.

    return;
            }
            const messagesByDestination = new Map();
            // Track the number of messages per partition so we can update the sequence number
            const messagesPerPartition = new NumericMap();
            // Normalize the partition of all messages, then enqueue them to their destination
            for (const message of messages) {
                message.partition %= metadata.topics.get(message.topic).partitionsCount;
                const { topic, partition } = message;
                const leader = metadata.topics.get(topic).partitions[partition].leader;
                let destination = messagesByDestination.get(leader);
                if (!destination) {
                    destination = [];
                    messagesByDestination.set(leader, destination);
                }
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions