Browse Source

kafka单个partition的发送未改为同步发送的bug fix

mcy 6 years ago
parent
commit
b71e299161

+ 1 - 1
server/src/main/java/com/alibaba/otter/canal/kafka/CanalKafkaProducer.java

@@ -105,7 +105,7 @@ public class CanalKafkaProducer implements CanalMQProducer {
                                 canalDestination.getPartition(),
                                 null,
                                 JSON.toJSONString(flatMessage));
-                            producer2.send(record);
+                            producer2.send(record).get();
                         } catch (Exception e) {
                             logger.error(e.getMessage(), e);
                             // producer.abortTransaction();