Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
ADAPT1-1599 | Remove exp backoff in registerSchema method
Browse files Browse the repository at this point in the history
  • Loading branch information
aadit-chugh committed Jul 11, 2024
1 parent 4ffece2 commit 508bfa1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ final class CreateTopicProgram[F[_]: Bracket[*[_], Throwable]: Sleep: Logger] pr
val suffixedSubject = subject.value + (if (isKey) "-key" else "-value")
val registerSchema: F[Option[SchemaVersion]] = {
schemaRegistry
.getVersion(suffixedSubject, schema, useExponentialBackoffRetryPolicy = true)
.getVersion(suffixedSubject, schema)
.attempt
.map(_.toOption)
.flatMap { previousSchemaVersion =>
schemaRegistry.registerSchema(suffixedSubject, schema) *>
schemaRegistry.getVersion(suffixedSubject, schema, useExponentialBackoffRetryPolicy = true).map {
schemaRegistry.getVersion(suffixedSubject, schema).map {
newSchemaVersion =>
if (previousSchemaVersion.contains(newSchemaVersion)) {
None
Expand Down

0 comments on commit 508bfa1

Please sign in to comment.