snowplow-incubator / common-streams

Other
1 stars 0 forks source link

Kafka: authenticate with Event Hubs using OAuth2 #58

Closed spenes closed 9 months ago

spenes commented 9 months ago

57

spenes commented 9 months ago

Thanks @istreeter! Actually, I tried that but realized that compiler doesn't enforce type parameter to be passed. So, it can be called like this still:

override def badSink: SinkProvider = KafkaSink.resource(_)

In that case, it gives following error while trying to initiate Kafka consumer/producer:

Could not instantiate class scala.runtime.Nothing

It works fine if type parameter is given. However, I think it is prone to obscure bugs since we don't get compiler error if type parameter isn't passed. Therefore, I decided to pass ClassTag explicitly instead.