From 7e37cbe95cf8dc54222fe787c3b886236ab728cc Mon Sep 17 00:00:00 2001 From: colmsnowplow Date: Wed, 13 Sep 2023 12:36:42 +0200 Subject: [PATCH] Nsq doesn't have a backoff policy implementation --- .../sinks/NsqSink.scala | 2 +- .../sinks/NsqSinkConfig.scala | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/nsq/src/main/scala/com.snowplowanalytics.snowplow.collectors.scalastream/sinks/NsqSink.scala b/nsq/src/main/scala/com.snowplowanalytics.snowplow.collectors.scalastream/sinks/NsqSink.scala index 3969733f0..e2c1c00a9 100644 --- a/nsq/src/main/scala/com.snowplowanalytics.snowplow.collectors.scalastream/sinks/NsqSink.scala +++ b/nsq/src/main/scala/com.snowplowanalytics.snowplow.collectors.scalastream/sinks/NsqSink.scala @@ -52,7 +52,7 @@ class NsqSink[F[_]: Sync] private ( implicit lazy val ec: ExecutionContextExecutorService = concurrent.ExecutionContext.fromExecutorService(executorService) - override def isHealthy: F[Boolean] = Sync[F].pure(true) + override def isHealthy: F[Boolean] = Sync[F].pure(true) //TODO: Figure out this implementation private val producer = new NSQProducer().addAddress(nsqConfig.host, nsqConfig.port).start() diff --git a/nsq/src/main/scala/com.snowplowanalytics.snowplow.collectors.scalastream/sinks/NsqSinkConfig.scala b/nsq/src/main/scala/com.snowplowanalytics.snowplow.collectors.scalastream/sinks/NsqSinkConfig.scala index 28056af14..7be6ab950 100644 --- a/nsq/src/main/scala/com.snowplowanalytics.snowplow.collectors.scalastream/sinks/NsqSinkConfig.scala +++ b/nsq/src/main/scala/com.snowplowanalytics.snowplow.collectors.scalastream/sinks/NsqSinkConfig.scala @@ -26,7 +26,6 @@ import com.snowplowanalytics.snowplow.collector.core.Config final case class NsqSinkConfig( maxBytes: Int, - // backoffPolicy: NsqSinkConfig.BackoffPolicyConfig, // TODO: Figure out if this is used/needed/should be included as optional threadPoolSize: Int, host: String, port: Int @@ -34,8 +33,5 @@ final case class NsqSinkConfig( object NsqSinkConfig { - final case class BackoffPolicyConfig(minBackoff: Long, maxBackoff: Long, maxRetries: Int) - - implicit val configDecoder: Decoder[NsqSinkConfig] = deriveDecoder[NsqSinkConfig] - implicit val backoffPolicyDecoder: Decoder[BackoffPolicyConfig] = deriveDecoder[BackoffPolicyConfig] + implicit val configDecoder: Decoder[NsqSinkConfig] = deriveDecoder[NsqSinkConfig] }