fgerlits commented on code in PR #1432:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1432#discussion_r1081544979


##########
extensions/mqtt/processors/PublishMQTT.h:
##########
@@ -62,72 +68,116 @@ class PublishMQTT : public 
processors::AbstractMQTTProcessor {
 
   ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_PROCESSORS
 
-  class ReadCallback {
+  void readProperties(const std::shared_ptr<core::ProcessContext>& context) 
override;
+  void onTriggerImpl(const std::shared_ptr<core::ProcessContext>& context, 
const std::shared_ptr<core::ProcessSession>& session) override;
+  void initialize() override;
+
+ private:
+  /**
+   * Counts unacknowledged QoS 1 and QoS 2 messages to respect broker's 
Receive Maximum
+   */
+  class InFlightMessageCounter {
    public:
-    ReadCallback(PublishMQTT* processor, uint64_t flow_size, uint64_t 
max_seg_size, std::string topic, MQTTAsync client, int qos, bool retain)
-        : processor_(processor),
-          flow_size_(flow_size),
-          max_seg_size_(max_seg_size),
-          topic_(std::move(topic)),
-          client_(client),
-          qos_(qos),
-          retain_(retain) {
+    void setMqttVersion(const MqttVersions mqtt_version) {
+      mqtt_version_ = mqtt_version;
+    }
+
+    void setQoS(const MqttQoS qos) {
+      qos_ = qos;
+    }
+
+    void setMax(const uint16_t new_limit) {
+      limit_ = new_limit;

Review Comment:
   fixed as part of 4c9135228d68f26e6438ce3f679379628ab4eb7d



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to