54 const net::config::ConfigInstance* configInstance = socketConnection->getConfigInstance();
64 }
catch (
const std::exception& exception) {
65 VLOG(0) << socketConnection->getConnectionName() <<
" MQTTStore startup failed: " << exception.what();
69 return new iot::mqtt::SocketContext(socketConnection,
70 new mqtt::mqttstore::lib::Mqtt(socketConnection->getConnectionName(),
71 configSession->getClientId(),
72 configSession->getQoS(),
73 configSession->getKeepAlive(),
74 !configSession->getRetainSession(),
75 configSession->getWillTopic(),
76 configSession->getWillMessage(),
77 configSession->getWillQoS(),
78 configSession->getWillRetain(),
79 configSession->getUsername(),
80 configSession->getPassword(),
81 configSubscribe->getTopic(),
82 {.database = configDatabase->getDatabase(),
83 .username = configDatabase->getUsername(),
84 .password = configDatabase->getPassword(),
85 .host = configDatabase->getHost(),
86 .port = configDatabase->getPort(),
87 .socket = configDatabase->getSocket(),
88 .flags = configDatabase->getFlags()},
89 storageOptions.rawTable,
90 storageOptions.autoCreateRawTable,
91 std::move(storagePlan),
92 configSession->getSessionStore()));
core::socket::stream::SocketContext * create(core::socket::stream::SocketConnection *socketConnection) final
StorageOptions getStorageOptions(const mqtt::mqttstore::lib::ConfigStorage *configStorage)