Skip to content

Commit

Permalink
Merge pull request #1472 from folio-org/tmp-release-24.2.5
Browse files Browse the repository at this point in the history
[CIRC-2085] Release 24.2.5
  • Loading branch information
roman-barannyk authored Apr 30, 2024
2 parents 32866a3 + 8317c50 commit efa4789
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 24.2.5 2024-04-30

* Fix Kafka configuration (CIRC-2037)

## 24.2.4 2024-04-23

* Fix empty template token, 'chargeDate', in reminder notices (CIRC-2077)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>mod-circulation</artifactId>
<groupId>org.folio</groupId>
<version>24.2.5-SNAPSHOT</version>
<version>24.2.6-SNAPSHOT</version>
<licenses>
<license>
<name>Apache License 2.0</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private Future<Void> createConsumers() {
return Future.all(List.of(
createConsumer(CIRCULATION_RULES_UPDATED, new CirculationRulesUpdateEventHandler(),
// puts consumers into separate groups so that they all receive the same event
new UniqueKafkaModuleIdProvider(vertx, kafkaConfig, CIRCULATION_RULES_UPDATED))
new UniqueKafkaModuleIdProvider(vertx, CIRCULATION_RULES_UPDATED))
)).mapEmpty();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

import static java.util.Comparator.comparing;
import static java.util.stream.Collectors.toMap;
import static org.apache.kafka.clients.producer.ProducerConfig.BOOTSTRAP_SERVERS_CONFIG;
import static org.folio.kafka.KafkaTopicNameHelper.formatGroupName;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.function.Consumer;
import java.util.function.UnaryOperator;

import org.folio.circulation.domain.events.DomainEventType;
import org.folio.kafka.KafkaConfig;
import org.folio.kafka.services.KafkaEnvironmentProperties;

import io.vertx.core.Future;
import io.vertx.core.Vertx;
Expand All @@ -26,9 +25,14 @@ public class UniqueKafkaModuleIdProvider implements ModuleIdProvider {
private final KafkaAdminClient kafkaAdminClient;
private final DomainEventType eventType;

public UniqueKafkaModuleIdProvider(Vertx vertx, KafkaConfig kafkaConfig, DomainEventType eventType) {
Properties config = new Properties();
config.put(BOOTSTRAP_SERVERS_CONFIG, kafkaConfig.getKafkaUrl());
public UniqueKafkaModuleIdProvider(Vertx vertx, DomainEventType eventType) {
Map<String, String> config = KafkaConfig.builder()
.kafkaHost(KafkaEnvironmentProperties.host())
.kafkaPort(KafkaEnvironmentProperties.port())
.build()
.getProducerProps();

log.info("UniqueKafkaModuleIdProvider:: KafkaAdminClient config: {}", config);

this.kafkaAdminClient = KafkaAdminClient.create(vertx, config);
this.eventType = eventType;
Expand Down

0 comments on commit efa4789

Please sign in to comment.