Skip to content

Commit

Permalink
always print cluster name for verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
nitram509 committed Nov 18, 2023
1 parent a2fa5ae commit 731ff50
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/java/io/zeebe/monitor/zeebe/ZeebeHazelcastService.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
import com.hazelcast.client.HazelcastClient;
import com.hazelcast.client.config.ClientConfig;
import com.hazelcast.core.HazelcastInstance;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import java.time.Duration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import java.time.Duration;

@Component
public class ZeebeHazelcastService {

Expand All @@ -26,6 +25,7 @@ public class ZeebeHazelcastService {

@Value("${zeebe.client.worker.hazelcast.clusterName}")
private String hazelcastClusterName;

@Autowired private ZeebeImportService importService;

private AutoCloseable closeable;
Expand All @@ -40,12 +40,12 @@ public void start() {
connectionRetryConfig.setClusterConnectTimeoutMillis(
Duration.parse(hazelcastConnectionTimeout).toMillis());

if(hazelcastClusterName != null) {
clientConfig.setClusterName(hazelcastClusterName);
}

LOG.info("Connecting to Hazelcast '{}'", hazelcastConnection);
clientConfig.setClusterName(hazelcastClusterName);

LOG.info(
"Connecting to Hazelcast '{}', cluster name '{}'",
hazelcastConnection,
hazelcastClusterName);
final HazelcastInstance hazelcast = HazelcastClient.newHazelcastClient(clientConfig);

LOG.info("Importing records from Hazelcast...");
Expand Down

0 comments on commit 731ff50

Please sign in to comment.