How to set up group id when using xk6-kafka

I have been looking into the xk6 load test for kafka.
However, the writer() and reader() functions both have the description as followed:

The first argument is an array of strings that signifies the bootstrap server addresses and the second is the topic you want to reader from.

I am wondering if it is possible to specify a group.id after Topic

@cccc
As mentioned in this v0.5.0 release, the reader can consume from consumer groups using a groupID:

I think there is no such thing as a producer group, which is why it’s only the reader that accepts the groupID parameter.

2 Likes

Thank you for the information!
So i tried following the structure below

// partition and groupID are mutually exclusive

const consumer = reader(
    bootstrapServers,
    kafkaTopic,
    partition,
    groupID
);

But I am hoping to consume all partitions of the same group.ID.
By default kafka consumes all partition, however, when i provide nullish value as argument here it seems to be blocking me from consuming messages

@cccc
Please make an issue in the project on GitHub if you still experience this issue.