diff --git a/src/connector/src/sink/kafka.rs b/src/connector/src/sink/kafka.rs index f52eb0bfa36f8..046e78cef9d54 100644 --- a/src/connector/src/sink/kafka.rs +++ b/src/connector/src/sink/kafka.rs @@ -430,10 +430,13 @@ impl KafkaSinkWriter { Err((e, rec)) => { err = e; record = rec; - // FIXME: Will there possibly exist other errors? - assert!(err == KafkaError::MessageProduction(RDKafkaErrorCode::QueueFull)); - tokio::time::sleep(self.config.retry_interval).await; - continue; + match err { + KafkaError::MessageProduction(RDKafkaErrorCode::QueueFull) => { + tokio::time::sleep(self.config.retry_interval).await; + continue; + } + _ => break, + } } } }