Skip to content

Commit

Permalink
Merge pull request #297 from tomorrow-one/backport-PR-258-spring-6.0
Browse files Browse the repository at this point in the history
Backport PR 258 to Spring 6.0, release outbox-kafka-spring 3.2.2
  • Loading branch information
magro authored Jan 29, 2024
2 parents 626a353 + 9ea00ba commit 7110bc7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent.*
import java.util.*

project(":commons").version = "2.2.2-SNAPSHOT"
project(":outbox-kafka-spring").version = "3.2.2-SNAPSHOT"
project(":outbox-kafka-spring").version = "3.2.2"
project(":outbox-kafka-spring-reactive").version = "3.1.2-SNAPSHOT"

plugins {
Expand Down
2 changes: 1 addition & 1 deletion outbox-kafka-spring/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ dependencies {
val log4jVersion = "2.22.0"
val testcontainersVersion = "1.19.3"

implementation("one.tomorrow.transactional-outbox:commons:2.2.1")
implementation("org.springframework:spring-context:$springVersion")
implementation("org.springframework:spring-jdbc:$springVersion")
implementation("org.postgresql:postgresql:42.7.1")
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.3")
implementation("org.apache.kafka:kafka-clients:$kafkaVersion")
"protobufSupportImplementation"("com.google.protobuf:protobuf-java:${rootProject.extra["protobufVersion"]}")
implementation(project(":commons"))
implementation("org.slf4j:slf4j-api:2.0.9")
implementation("jakarta.annotation:jakarta.annotation-api:2.1.1")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private boolean acquireOrRefreshLock(String ownerId, Duration timeout, Transacti
try {
OutboxLock lock = jdbcTemplate.query("select * from outbox_kafka_lock where id = '" + OUTBOX_LOCK_ID + "'", resultSetExtractor);
if (lock == null) {
logger.debug("No outbox lock found. Creating one for {}", ownerId);
logger.info("No outbox lock found. Creating one for {}", ownerId);
validUntil = now.plus(timeout);
jdbcTemplate.update("insert into outbox_kafka_lock (id, owner_id, valid_until) values (?, ?, ?)", OUTBOX_LOCK_ID, ownerId, Timestamp.from(validUntil));
} else if (ownerId.equals(lock.getOwnerId())) {
Expand All @@ -89,7 +89,7 @@ private boolean acquireOrRefreshLock(String ownerId, Duration timeout, Transacti
}

txStatus.flush();
logger.info("Acquired or refreshed outbox lock for owner {}, valid until {}", ownerId, validUntil);
logger.debug("Acquired or refreshed outbox lock for owner {}, valid until {}", ownerId, validUntil);
return true;
} catch (UncategorizedSQLException e) {
return handleException(e, ownerId);
Expand Down

0 comments on commit 7110bc7

Please sign in to comment.