All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fs2.kafka.UnexpectedTopicException.scala Maven / Gradle / Ivy

There is a newer version: 3.6.0-RC1
Show newest version
/*
 * Copyright 2018-2024 OVO Energy Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

package fs2.kafka

import org.apache.kafka.common.KafkaException

/**
  * [[UnexpectedTopicException]] is raised when serialization or deserialization occurred for an
  * unexpected topic which isn't supported by the [[Serializer]] or [[Deserializer]].
  */
sealed abstract class UnexpectedTopicException(topic: String)
    extends KafkaException(s"unexpected topic [$topic]")

private[kafka] object UnexpectedTopicException {

  def apply(topic: String): UnexpectedTopicException =
    new UnexpectedTopicException(topic) {

      override def toString: String =
        s"fs2.kafka.UnexpectedTopicException: $getMessage"

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy