You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been reading from Kafka and trying to figure out which offset management would be the best for my use-case. During that I noticed something odd.
The name of the method, and how it's being used in the code certainly suggest that using read_committed isolation level handles and commits kafka offsets.Seemed strange, but I'm not a Kafka pro, so let's test it. Well it does not.
using ONLY ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG does commit it
using ONLY commitOffsetsInFinalize() does commit it
using ONLY withReadCommitted() does NOT commit it
Dataflow, 2.40.0 Java SDK, without explicitly enabling SDF-read
So is it a bug, or what am I missing here?
If it is indeed a bug, then is it with the read_committed (so it should commit it although found no explicit documentation about that anywhere), or having that isolation level shouldn't prefer the commit in the finalize and that method is wrong?
@johnjcasey:
withReadCommitted() doesn't commit messages when read, it instead specifies that the kafka consumer should only read messages that have themselves been committed to kafka.
Its use is for exactly once applications.
@johnjcasey
Which looking at your message again, would imply that the configuredKafkaCommit() method shouldn't inspect isolation.level
Issue Priority
Priority: 2
Issue Component
Component: io-java-kafka
The text was updated successfully, but these errors were encountered:
What happened?
I have been reading from Kafka and trying to figure out which offset management would be the best for my use-case. During that I noticed something odd.
beam/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java
Lines 2359 to 2362 in c9c161d
beam/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java
Lines 2292 to 2298 in c9c161d
beam/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java
Lines 2321 to 2334 in c9c161d
The name of the method, and how it's being used in the code certainly suggest that using read_committed isolation level handles and commits kafka offsets.Seemed strange, but I'm not a Kafka pro, so let's test it. Well it does not.
using ONLY ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG does commit it
using ONLY commitOffsetsInFinalize() does commit it
using ONLY withReadCommitted() does NOT commit it
Dataflow, 2.40.0 Java SDK, without explicitly enabling SDF-read
So is it a bug, or what am I missing here?
If it is indeed a bug, then is it with the read_committed (so it should commit it although found no explicit documentation about that anywhere), or having that isolation level shouldn't prefer the commit in the finalize and that method is wrong?
@johnjcasey:
withReadCommitted() doesn't commit messages when read, it instead specifies that the kafka consumer should only read messages that have themselves been committed to kafka.
Its use is for exactly once applications.
@johnjcasey
Which looking at your message again, would imply that the configuredKafkaCommit() method shouldn't inspect isolation.level
Issue Priority
Priority: 2
Issue Component
Component: io-java-kafka
The text was updated successfully, but these errors were encountered: