[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #650: MINIFICPP-1034 - MQTT processors doesnt work
arpadboda commented on a change in pull request #650: MINIFICPP-1034 - MQTT processors doesnt work URL: https://github.com/apache/nifi-minifi-cpp/pull/650#discussion_r326549739 ## File path: extensions/mqtt/processors/AbstractMQTTProcessor.h ## @@ -28,16 +28,16 @@ #include "core/logging/LoggerConfiguration.h" #include "MQTTClient.h" -#define MQTT_QOS_0 "0" -#define MQTT_QOS_1 "1" -#define MQTT_QOS_2 "2" - namespace org { namespace apache { namespace nifi { namespace minifi { namespace processors { +#define MQTT_QOS_0 "0" Review comment: Just wanted to put the definitions together, but constexpr is a fair point. Changed them. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #650: MINIFICPP-1034 - MQTT processors doesnt work
arpadboda commented on a change in pull request #650: MINIFICPP-1034 - MQTT processors doesnt work URL: https://github.com/apache/nifi-minifi-cpp/pull/650#discussion_r326531799 ## File path: extensions/mqtt/processors/PublishMQTT.cpp ## @@ -76,15 +67,15 @@ void PublishMQTT::onSchedule(core::ProcessContext *context, core::ProcessSession } void PublishMQTT::onTrigger(const std::shared_ptr , const std::shared_ptr ) { - std::shared_ptr flowFile = session->get(); - - if (!flowFile) { + if (!reconnect()) { Review comment: Reconnect doesn't do anything unless the connection is interrupted. If we have an existing connection (expected case), it just returns true. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #650: MINIFICPP-1034 - MQTT processors doesnt work
arpadboda commented on a change in pull request #650: MINIFICPP-1034 - MQTT processors doesnt work URL: https://github.com/apache/nifi-minifi-cpp/pull/650#discussion_r326273570 ## File path: extensions/mqtt/processors/AbstractMQTTProcessor.cpp ## @@ -46,32 +46,15 @@ core::Property AbstractMQTTProcessor::SecurityCA("Security CA", "File or directo core::Property AbstractMQTTProcessor::SecurityCert("Security Cert", "Path to client's public key (PEM) used for authentication", ""); core::Property AbstractMQTTProcessor::SecurityPrivateKey("Security Private Key", "Path to client's private key (PEM) used for authentication", ""); core::Property AbstractMQTTProcessor::SecurityPrivateKeyPassWord("Security Pass Phrase", "Private key passphrase", ""); Review comment: These are not exported, but clearly never been tested as well, so created https://issues.apache.org/jira/browse/MINIFICPP-1035 to address this. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #650: MINIFICPP-1034 - MQTT processors doesnt work
arpadboda commented on a change in pull request #650: MINIFICPP-1034 - MQTT processors doesnt work URL: https://github.com/apache/nifi-minifi-cpp/pull/650#discussion_r326269553 ## File path: extensions/mqtt/processors/AbstractMQTTProcessor.cpp ## @@ -46,32 +46,15 @@ core::Property AbstractMQTTProcessor::SecurityCA("Security CA", "File or directo core::Property AbstractMQTTProcessor::SecurityCert("Security Cert", "Path to client's public key (PEM) used for authentication", ""); core::Property AbstractMQTTProcessor::SecurityPrivateKey("Security Private Key", "Path to client's private key (PEM) used for authentication", ""); core::Property AbstractMQTTProcessor::SecurityPrivateKeyPassWord("Security Pass Phrase", "Private key passphrase", ""); -core::Relationship AbstractMQTTProcessor::Success("success", "FlowFiles that are sent successfully to the destination are transferred to this relationship"); -core::Relationship AbstractMQTTProcessor::Failure("failure", "FlowFiles that failed to send to the destination are transferred to this relationship"); -void AbstractMQTTProcessor::initialize() { - // Set the supported properties - std::set properties; - properties.insert(BrokerURL); - properties.insert(CleanSession); - properties.insert(ClientID); - properties.insert(UserName); - properties.insert(PassWord); - properties.insert(KeepLiveInterval); - properties.insert(ConnectionTimeOut); - properties.insert(QOS); - properties.insert(Topic); - setSupportedProperties(properties); - // Set the supported relationships - std::set relationships; - relationships.insert(Success); - relationships.insert(Failure); - setSupportedRelationships(relationships); - MQTTClient_SSLOptions sslopts_ = MQTTClient_SSLOptions_initializer; Review comment: This was just hiding instead of initializing the member. So it had no chance to work, but it didn't pop up given the security properties are not exported, so it's never referenced. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #650: MINIFICPP-1034 - MQTT processors doesnt work
arpadboda commented on a change in pull request #650: MINIFICPP-1034 - MQTT processors doesnt work URL: https://github.com/apache/nifi-minifi-cpp/pull/650#discussion_r326269891 ## File path: extensions/mqtt/processors/AbstractMQTTProcessor.cpp ## @@ -46,32 +46,15 @@ core::Property AbstractMQTTProcessor::SecurityCA("Security CA", "File or directo core::Property AbstractMQTTProcessor::SecurityCert("Security Cert", "Path to client's public key (PEM) used for authentication", ""); core::Property AbstractMQTTProcessor::SecurityPrivateKey("Security Private Key", "Path to client's private key (PEM) used for authentication", ""); core::Property AbstractMQTTProcessor::SecurityPrivateKeyPassWord("Security Pass Phrase", "Private key passphrase", ""); -core::Relationship AbstractMQTTProcessor::Success("success", "FlowFiles that are sent successfully to the destination are transferred to this relationship"); -core::Relationship AbstractMQTTProcessor::Failure("failure", "FlowFiles that failed to send to the destination are transferred to this relationship"); -void AbstractMQTTProcessor::initialize() { - // Set the supported properties - std::set properties; - properties.insert(BrokerURL); - properties.insert(CleanSession); - properties.insert(ClientID); - properties.insert(UserName); - properties.insert(PassWord); - properties.insert(KeepLiveInterval); - properties.insert(ConnectionTimeOut); - properties.insert(QOS); - properties.insert(Topic); - setSupportedProperties(properties); - // Set the supported relationships - std::set relationships; - relationships.insert(Success); - relationships.insert(Failure); - setSupportedRelationships(relationships); - MQTTClient_SSLOptions sslopts_ = MQTTClient_SSLOptions_initializer; - sslEnabled_ = false; Review comment: Too bad it was only initialized here, but none of the baseclasses called this function. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services