--- a/src/relpipe-out-mqtt.cpp Sun May 08 21:42:25 2022 +0200
+++ b/src/relpipe-out-mqtt.cpp Sun Jun 05 00:08:52 2022 +0200
@@ -44,8 +44,8 @@
CLIParser cliParser;
Configuration configuration = cliParser.parse(cli.arguments());
std::shared_ptr<RelationalReader> reader(Factory::create(std::cin));
- MQTTHandler handler(configuration);
- reader->addHandler(&handler);
+ std::shared_ptr<MQTTHandler> handler(MQTTHandler::create(configuration));
+ reader->addHandler(handler.get());
reader->process();
resultCode = CLI::EXIT_CODE_SUCCESS;
} catch (RelpipeCLIException e) {