Repository navigation
Getting/Setting consumer state #815
Replies: 1 comment
|
Matan Rosenberg (@matan129) - there is no live getter or setter for the consumer's position, but the state you want is already in Kafka, and it is more granular than the committed offset alone. PC's durable state per partition is exactly the committed Where the fork stands: the state itself has not changed on v0.6.0.0 beyond hardening the decoder against corrupt metadata. A readable, settable position is the open issue astubbs#157; if this backup-and-resume case is what you need, describe it there and it can be made an API rather than a recipe. Two open pull requests, not merged, sit beside it: a health-check surface that reports run state and failure cause, not positions (astubbs#226), and an embedded dashboard showing the in-flight state (astubbs#268). The coordinates changed with the fork - on Maven Central it is now: <dependency>
<groupId>bz.stub.parallelconsumer</groupId>
<artifactId>parallel-consumer-core</artifactId>
<version>0.6.0.0</version>
</dependency>( find . -name '*.java' -exec sed -i 's/io\.confluent\.parallelconsumer/bz.stub.parallelconsumer/g' {} + |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
One of my apps uses Parallel Consumer 0.5.2.8.
It consumes messages from Kafka with consumer group A, and maintains some data structure on-disk.
This data structure (well - a collection of files) is periodically backed up to remote storage.
I have a use case in which a different service (with consumer group B), needs to download the backup and start ingesting from the point that service A left it.
Q: Is there a way to get (and set?) the current position & state of the consumer?
Currently, I get the committed offsets per partition and use it as an approximation, but it's not granular enough.
Thanks!
All reactions