Let's say I have the offset and partition of specific messages in a kafkajs topic. How can I attach a consumer to this topic and consume only these specific messages? For example, if I have the offset and partition of a message in a topic, I would like to consume only that message, and no other messages. Is this possible?
You can seek
a consumer to a partition+offset, then break the consumer loop when you get that one event, yes.