[KARAF-6055] Use Kafka almost sync producer 68/head
authorJean-Baptiste Onofré <jbonofre@apache.org>
Wed, 19 Dec 2018 14:39:29 +0000 (15:39 +0100)
committerJean-Baptiste Onofré <jbonofre@apache.org>
Fri, 21 Dec 2018 07:44:49 +0000 (08:44 +0100)
appender/kafka/src/main/java/org/apache/karaf/decanter/appender/kafka/KafkaAppender.java
pom.xml

index 2d4f865..c09dd66 100644 (file)
@@ -81,9 +81,9 @@ public class KafkaAppender implements EventHandler {
                         LOGGER.warn("Can't send event to Kafka broker", e);
                     }
                 }
-            });
+            }).get();
             producer.flush();
-        } catch (RuntimeException e) {
+        } catch (Exception e) {
             LOGGER.warn("Error sending event to kafka", e);
         }
     }
diff --git a/pom.xml b/pom.xml
index 8634927..63e4edb 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                 <exclude>**/META-INF/spring.factories</exclude>
                                 <exclude>**/META-INF/decanter.bundles.default</exclude>
                                 <exclude>**/bundle8/**/*</exclude>
+                                <exclude>**/test.cfg</exclude>
                             </excludes>
                             <consoleOutput>true</consoleOutput>
                         </configuration>