I have been working on spring cloud sleuth to push traces to zipkin, We are pushing traces to Kafka with the help of spring-cloud-starter-stream-kafka
and spring-cloud-sleuth-stream
Below are the dependencies I have added to my application
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth', version: '1.0.0.RELEASE'
compile group: 'org.springframework.cloud', name: 'spring-cloud-sleuth-stream', version: '1.2.4.RELEASE'
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-stream-kafka', version: '1.2.0.RELEASE'
And my application property just have kafka broker which is by default pushing traces to sleuth
topic spring.cloud.stream.kafka.binder.brokers=locahost:9092
Everything is working fine as of now but I am not able to figure out if we can start the application if Kafka is down ?
From the logs I see application starts, but since it will be not able to connect to kafka we will be not able to access any of the endpoints (Added some bits of logs below). Looking for this solution because pushing traces is not the primary function of my application.
Started testApp in 0.299 seconds (JVM running for 20.241)
[WARN] 2019-12-19 13:27:56,183 main org.apache.kafka.clients.producer.ProducerConfig - {} - The configuration 'key.deserializer' was supplied but isn't a known config.
[WARN] 2019-12-19 13:27:56,183 main org.apache.kafka.clients.producer.ProducerConfig - {} - The configuration 'value.deserializer' was supplied but isn't a known config.
[INFO] 2019-12-19 13:27:56,184 main org.apache.kafka.common.utils.AppInfoParser - {} - Kafka version : 0.11.0.0
[INFO] 2019-12-19 13:27:56,184 main org.apache.kafka.common.utils.AppInfoParser - {} - Kafka commitId : cb8625948210849f
[WARN] 2019-12-19 13:27:56,225 kafka-producer-network-thread | producer-1 org.apache.kafka.clients.NetworkClient - {} - Connection to node -1 could not be established. Broker may not be available.
[WARN] 2019-12-19 13:27:56,335 kafka-producer-network-thread | producer-1 org.apache.kafka.clients.NetworkClient - {} - Connection to node -1 could not be established. Broker may not be available.
[WARN] 2019-12-19 13:27:56,390 kafka-producer-network-thread | producer-1 org.apache.kafka.clients.NetworkClient - {} - Connection to node -1 could not be established. Broker may not be available.