Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kafka-servers): Fix the issue of gms/mae/mce not starting when multiple kafka servers are set #2231

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/datahub-gms/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fi

dockerize \
-wait tcp://$EBEAN_DATASOURCE_HOST \
-wait tcp://$KAFKA_BOOTSTRAP_SERVER \
-wait tcp://$(echo $KAFKA_BOOTSTRAP_SERVER | sed 's/,/ -wait tcp:\/\//g') \
-wait http://$ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT \
-wait $NEO4J_HOST \
-timeout 240s \
Expand Down
2 changes: 1 addition & 1 deletion docker/datahub-mae-consumer/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if ! echo $NEO4J_HOST | grep -q "://" ; then
fi

dockerize \
-wait tcp://$KAFKA_BOOTSTRAP_SERVER \
-wait tcp://$(echo $KAFKA_BOOTSTRAP_SERVER | sed 's/,/ -wait tcp:\/\//g') \
-wait http://$ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT \
-wait $NEO4J_HOST \
-timeout 240s \
Expand Down
2 changes: 1 addition & 1 deletion docker/datahub-mce-consumer/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# -wait tcp://GMS_HOST:$GMS_PORT \
dockerize \
-wait tcp://$KAFKA_BOOTSTRAP_SERVER \
-wait tcp://$(echo $KAFKA_BOOTSTRAP_SERVER | sed 's/,/ -wait tcp:\/\//g') \
-timeout 240s \
java -jar /datahub/datahub-mce-consumer/bin/mce-consumer-job.jar
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.confluent.kafka.serializers.AbstractKafkaAvroSerDeConfig;
import io.confluent.kafka.serializers.KafkaAvroDeserializer;
import java.time.Duration;
import java.util.Arrays;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.apache.avro.generic.GenericRecord;
Expand Down Expand Up @@ -40,7 +41,7 @@ public KafkaListenerContainerFactory<?> kafkaListenerContainerFactory(KafkaPrope

// KAFKA_BOOTSTRAP_SERVER has precedence over SPRING_KAFKA_BOOTSTRAP_SERVERS
if (kafkaBootstrapServer != null && kafkaBootstrapServer.length() > 0) {
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, kafkaBootstrapServer);
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, Arrays.asList(kafkaBootstrapServer.split(",")));
} // else we rely on KafkaProperties which defaults to localhost:9092

props.put(AbstractKafkaAvroSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, kafkaSchemaRegistryUrl);
Expand Down