RebalanceRevokeMode

fs2.kafka.RebalanceRevokeMode
See theRebalanceRevokeMode companion object
sealed abstract class RebalanceRevokeMode

The available options for ConsumerSettings#rebalanceRevokeMode.

Available options include:

org.apache.kafka.clients.consumer.ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG

It is guaranteed by kafka protocol that after that timeout old consumer will be marked as dead.

Default mode is RebalanceRevokeMode.Eager which is exactly the same as old behavior and can be preferred if rebalance need to happen as quickly as possible and having multiple consumers working on a partition for a moment is not a problem.

On the other hand if you want stricter guarantees about processing and attempt to wait for existing streams to finish processing messages before releasing partition choose RebalanceRevokeMode.Graceful. Because stream is signalled to be shutdown in-flight commits might be lost and some messages might be processed again after new assignment.

Attributes

Companion
object
Source
RebalanceRevokeMode.scala
Graph
Supertypes
class Object
trait Matchable
class Any
In this article