diff --git a/runbullet/backend/kafka/__init__.py b/runbullet/backend/kafka/__init__.py index 0cfd797e0..c0fabbfff 100644 --- a/runbullet/backend/kafka/__init__.py +++ b/runbullet/backend/kafka/__init__.py @@ -37,6 +37,7 @@ class KafkaBackend(Backend): self._init_producer() self.producer.send(self.topic, msg) + self.producer.flush() def run(self): self.consumer = KafkaConsumer(self.topic, bootstrap_servers=self.server) diff --git a/runbullet/bin/pusher b/runbullet/bin/pusher index 0fb06bb2b..2eebb3cf2 100755 --- a/runbullet/bin/pusher +++ b/runbullet/bin/pusher @@ -84,7 +84,7 @@ def main(): backend = get_backend(config) if isinstance(backend, Pushbullet): send_pb_message(backend, config['backend.pushbullet']['device'], msg) - elif isinstance(backend, Pushbullet): + elif isinstance(backend, KafkaBackend): send_kafka_message(backend, msg)