diff --git a/modules/core/src/main/scala/fs2/kafka/AdminClientSettings.scala b/modules/core/src/main/scala/fs2/kafka/AdminClientSettings.scala index 8cbfd2879..b29badbf6 100644 --- a/modules/core/src/main/scala/fs2/kafka/AdminClientSettings.scala +++ b/modules/core/src/main/scala/fs2/kafka/AdminClientSettings.scala @@ -231,6 +231,13 @@ object AdminClientSettings { } + @deprecated("use the overload that takes an argument for BootstrapServers", "2.0.0") + def apply: AdminClientSettings = + AdminClientSettingsImpl( + properties = Map.empty, + closeTimeout = 20.seconds + ) + def apply(bootstrapServers: String): AdminClientSettings = AdminClientSettingsImpl( properties = Map.empty, diff --git a/modules/core/src/main/scala/fs2/kafka/package.scala b/modules/core/src/main/scala/fs2/kafka/package.scala index 30d92d360..c25907772 100644 --- a/modules/core/src/main/scala/fs2/kafka/package.scala +++ b/modules/core/src/main/scala/fs2/kafka/package.scala @@ -130,6 +130,11 @@ package kafka { object TransactionalProducerRecords { + @deprecated("this is now an identity operation", "3.0.0-M5") + def apply[F[_], K, V]( + chunk: Chunk[CommittableProducerRecords[F, K, V]] + ): Chunk[CommittableProducerRecords[F, K, V]] = chunk + /** * Creates a new [[TransactionalProducerRecords]] for producing exactly one * [[CommittableProducerRecords]] diff --git a/modules/vulcan/src/main/scala/fs2/kafka/vulcan/AvroSettings.scala b/modules/vulcan/src/main/scala/fs2/kafka/vulcan/AvroSettings.scala index 202283423..bcd0102bc 100644 --- a/modules/vulcan/src/main/scala/fs2/kafka/vulcan/AvroSettings.scala +++ b/modules/vulcan/src/main/scala/fs2/kafka/vulcan/AvroSettings.scala @@ -104,6 +104,12 @@ sealed abstract class AvroSettings[F[_]] { writerSchema: Option[Schema] ): F[(KafkaAvroSerializer, SchemaRegistryClient)] + @deprecated("use the overload that takes an optional writer schema", "2.5.0-M3") + final def createAvroSerializer( + isKey: Boolean + ): F[(KafkaAvroSerializer, SchemaRegistryClient)] = + createAvroSerializer(isKey, writerSchema = None) + /** * Creates a new [[AvroSettings]] instance with the specified function for creating * `KafkaAvroDeserializer`s from settings. The arguments are [[schemaRegistryClient]], `isKey`, @@ -126,6 +132,16 @@ sealed abstract class AvroSettings[F[_]] { // format: on ): AvroSettings[F] + @deprecated("use the overload that has an `Option[Schema]` argument", "2.5.0-M3") + final def withCreateAvroSerializer( + // format: off + createAvroSerializerWith: (F[SchemaRegistryClient], Boolean, Map[String, String]) => F[(KafkaAvroSerializer, SchemaRegistryClient)] + // format: on + ): AvroSettings[F] = + withCreateAvroSerializer((client, isKey, _, properties) => + createAvroSerializerWith(client, isKey, properties) + ) + /** * Creates a new [[AvroSettings]] instance with the specified function for registering schemas * from settings. The arguments are [[schemaRegistryClient]], `subject`, and `codec`.