Skip to content

Commit

Permalink
Update reader/src/main/scala/za/co/absa/kafkacase/reader/ReaderImpl.s…
Browse files Browse the repository at this point in the history
…cala

Co-authored-by: Saša Zejnilović <zejnils@gmail.com>
  • Loading branch information
ABMC831 and Zejnilovic authored Oct 24, 2024
1 parent 0be560a commit 09f4baa
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ import java.util
import java.util.Properties

class ReaderImpl[TType: Decoder](props: Properties, topic: String, timeout: Duration, neverEnding: Boolean) extends Reader[TType] {
// note: scala can't handle default parameters together with overloading.... hence slightly exponential number of auxiliary constructors
def this(config: Config, topic: String, timeout: Duration) = this(convertConfigToProperties(config), topic, timeout, true)
def this(config: Config, topic: String, neverEnding: Boolean) = this(convertConfigToProperties(config), topic, DEFAULT_TIMEOUT, neverEnding)
def this(config: Config, topic: String) = this(convertConfigToProperties(config), topic, DEFAULT_TIMEOUT, true)
def this(config: Config, topic: String, timeout: Duration, neverEnding: Boolean) = this(convertConfigToProperties(config), topic, timeout, neverEnding)
def this(props: Properties, topic: String, timeout: Duration) = this(props, topic, timeout, true)
def this(props: Properties, topic: String, neverEnding: Boolean) = this(props, topic, DEFAULT_TIMEOUT, neverEnding)
def this(props: Properties, topic: String) = this(props, topic, DEFAULT_TIMEOUT, true)

private val consumer = new KafkaConsumer[String, String](props)
consumer.subscribe(util.Arrays.asList(topic))
Expand Down

0 comments on commit 09f4baa

Please sign in to comment.