This issue occur when spring-boot/trend_service is deployed before any kafka topics are created. (As of today spring-boot/data_service automatically creates them during requests to its endpoints).
This is partial spring-boot/data_service log:
2024-10-07T16:14:19.173Z ERROR 1 --- [-StreamThread-1] o.a.k.s.p.internals.RepartitionTopi
cs : stream-thread [trend-service-2d306e57-550e-4945-9e66-c613c75aa355-StreamThread-1-c
onsumer] Subtopology 0 was missing source topics [title-searches] and will be excluded fro
m the current assignment, this can be due to the consumer client's metadata being stale or
because they have not been created yet. Please verify that you have created all input top
ics; if they do exist, you just need to wait for the metadata to be updated, at which time
a new rebalance will be kicked off automatically and the topology will be retried at that
time.
2024-10-07T16:14:19.175Z ERROR 1 --- [-StreamThread-1] o.a.k.s.p.i.StreamsPartitionAssigno
r : stream-thread [trend-service-2d306e57-550e-4945-9e66-c613c75aa355-StreamThread-1-c
onsumer] Caught an error in the task assignment. Returning an error assignment.
org.apache.kafka.streams.errors.MissingSourceTopicException: Missing source topics.
2024-10-07T16:14:19.270Z ERROR 1 --- [-StreamThread-1] o.a.k.s.p.internals.StreamThread : stream-thread [trend-service-2d306e57-550e-4945-9e66-c613c75aa355-StreamThread-1] Received error code INCOMPLETE_SOURCE_TOPIC_METADATA
2024-10-07T16:14:19.271Z ERROR 1 --- [-StreamThread-1] o.a.k.c.c.internals.ConsumerCoordinator : [Consumer clientId=trend-service-2d306e57-550e-4945-9e66-c613c75aa355-StreamThread-1-consumer, groupId=trend-service] User provided listener org.apache.kafka.streams.processor.internals.StreamsRebalanceListener failed on invocation of onPartitionsAssigned for partitions []
org.apache.kafka.streams.errors.MissingSourceTopicException: One or more source topics were missing during rebalance
2024-10-07T16:14:19.270Z ERROR 1 --- [-StreamThread-1] o.a.k.s.p.internals.StreamThread
: stream-thread [trend-service-2d306e57-550e-4945-9e66-c613c75aa355-StreamThread-1]
Received error code INCOMPLETE_SOURCE_TOPIC_METADATA
2024-10-07T16:14:19.271Z ERROR 1 --- [-StreamThread-1] o.a.k.c.c.internals.ConsumerCoordin
ator : [Consumer clientId=trend-service-2d306e57-550e-4945-9e66-c613c75aa355-StreamThread
-1-consumer, groupId=trend-service] User provided listener org.apache.kafka.streams.proces
sor.internals.StreamsRebalanceListener failed on invocation of onPartitionsAssigned for pa
rtitions []
org.apache.kafka.streams.errors.MissingSourceTopicException: One or more source topics wer
e missing during rebalance
2024-10-07T16:14:19.272Z ERROR 1 --- [-StreamThread-1] org.apache.kafka.streams.KafkaStreams : stream-client [trend-service-2d306e57-550e-4945-9e66-c613c75aa355] Encountered the following exception during processing and the registered exception handler opted to SHUTDOWN_CLIENT. The streams client is going to shut down now.
org.apache.kafka.streams.errors.MissingSourceTopicException: One or more source topics were missing during rebalance
2024-10-07T16:14:19.272Z INFO 1 --- [-StreamThread-1] org.apache.kafka.streams.KafkaStreams : stream-client [trend-service-2d306e57-550e-4945-9e66-c613c75aa355] State transition from REBALANCING to PENDING_ERROR
2024-10-07T16:14:19.307Z INFO 1 --- [355-CloseThread] org.apache.kafka.streams.KafkaStreams : stream-client [trend-service-2d306e57-550e-4945-9e66-c613c75aa355] State transition from PENDING_ERROR to ERROR
This issue occur when
spring-boot/trend_service
is deployed before any kafka topics are created. (As of todayspring-boot/data_service
automatically creates them during requests to its endpoints).This is partial
spring-boot/data_service
log: