Skip to content

Commit

Permalink
Revert "Remove deprecated methods (#1268)" (#1296)
Browse files Browse the repository at this point in the history
This reverts commit 6f8804c
  • Loading branch information
aartigao authored Feb 16, 2024
1 parent b4dd5a4 commit 849906f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions modules/core/src/main/scala/fs2/kafka/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
16 changes: 16 additions & 0 deletions modules/vulcan/src/main/scala/fs2/kafka/vulcan/AvroSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand All @@ -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`.
Expand Down

0 comments on commit 849906f

Please sign in to comment.