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 think this is a great idea. We could initially make it a private method and implement the other methods in terms of it, so we have time to iron out any issues before exposing it in the public API. Then when we expose it we can provide default implementations for the other methods in terms of it on KafkaConsume, making it much easier to mock KafkaConsume for testing.
Having played with this a bit, I think the stream should instead emit an ADT with subtypes Assigned(newlyAssignedPartitions: Map[TopicPartition, Stream[F, CommittableConsumerRecord[F, K, V]]) and Revoked(revokedPartitions: SortedSet[TopicPartition]). That's what the information we get from Java Kafka looks like, and a stream of FullAssignmentInfo can be generated in user code via a suitable fold.
After an #844
partitionsMapStream
is no more a "Stream
where each element contains a current assignment" as was mentioned in the scala doc previously.It looks like if we want to retain such functionality, we need to add a new stream method like this:
Naming is not final, just my thoughts.
The text was updated successfully, but these errors were encountered: