[Kafka Companion] Assertion of produced messages #2591
-
Hi, I have a question to the Kafka Companion: Is it possible to assert if the produced messages (with companion) was acknowledged positive or negative by the consumer (the application under test)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Kafka companion works solely on the Kafka level, so negative acknowledgement is not applicable. Acknowledgement being an offset commit (of a particular consumer) in Kafka, you can check the offset commit of a consumer group. companion.consumerGroups().offsets("my-consumer-group") On the other hand, the Kafka companion |
Beta Was this translation helpful? Give feedback.
Yes, in Kafka you can't reject or nack messages individually. You've either processed successfully records on the log (topic-partition) up to a certain point (offset) and committed that offset to the consumer group or you've not.