symmetric-ds icon indicating copy to clipboard operation
symmetric-ds copied to clipboard

Kafka timeouts now throw an exception instead of marking the batch complete

Open nikidimi opened this issue 5 years ago • 1 comments

KafkaWriterFilter will now throw an RuntimeException instead of failing silently (only with a log message) and marking the batch as complete.

Calling get() on the Future is necessary because producer.close() doesn't do anything on timeout.

This is the result after this patch:

`[data-116] - NetworkClient - [Producer clientId=SymmetricDS] Connection to node -1 could not be established. Broker may not be available. [data-116] - NetworkClient - [Producer clientId=SymmetricDS] Connection to node -1 could not be established. Broker may not be available. [data-116] - NetworkClient - [Producer clientId=SymmetricDS] Connection to node -1 could not be established. Broker may not be available. [data-116] - NetworkClient - [Producer clientId=SymmetricDS] Connection to node -1 could not be established. Broker may not be available. [data-116] - NetworkClient - [Producer clientId=SymmetricDS] Connection to node -1 could not be established. Broker may not be available. [data-116] - NetworkClient - [Producer clientId=SymmetricDS] Connection to node -1 could not be established. Broker may not be available. [data-116] - NetworkClient - [Producer clientId=SymmetricDS] Connection to node -1 could not be established. Broker may not be available. [data-116] - IDatabaseWriterFilter - Unable to write batch to Kafka batch-000-143 java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms. ... [data-116] - ManageIncomingBatchListener - Failed to load batch 000-143 java.lang.RuntimeException: Unable to write batch to Kafka batch-000-143 ... [data-116] - DataLoaderService - 1 data and 1 batches loaded during push request from 166:000:000. There were 1 batches in error [data-166] - AcknowledgeService - The outgoing batch 001-143 failed: Failed to update metadata after 60000 ms. [data-116] - IncomingBatchService - Retrying batch 000-143

`

nikidimi avatar Jul 10 '19 11:07 nikidimi

Could you please rebase this to 3.12? Thank you

rudiejd avatar Jul 28 '21 17:07 rudiejd