[GitHub] nifi pull request #548: NIFI-2045 - Removing mqtt message from queue after a...
Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/548 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] nifi pull request #548: NIFI-2045 - Removing mqtt message from queue after a...
Github user JPercivall commented on a diff in the pull request: https://github.com/apache/nifi/pull/548#discussion_r67957184 --- Diff: nifi-nar-bundles/nifi-mqtt-bundle/nifi-mqtt-processors/src/main/java/org/apache/nifi/processors/mqtt/ConsumeMQTT.java --- @@ -288,9 +289,13 @@ public void process(final OutputStream out) throws IOException { String transitUri = new StringBuilder(broker).append(mqttMessage.getTopic()).toString(); session.getProvenanceReporter().receive(messageFlowfile, transitUri); +String uuid = messageFlowfile.getAttribute(CoreAttributes.UUID.key()); session.transfer(messageFlowfile, REL_MESSAGE); -mqttQueue.remove(mqttMessage); session.commit(); +if (!mqttQueue.remove(mqttMessage)) { --- End diff -- In order to avoid concatenating the Strings in the logger message needlessly, this should check if warn is enabled too: `... && getLogger().isWarnEnabled()` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] nifi pull request #548: NIFI-2045 - Removing mqtt message from queue after a...
Github user JPercivall commented on a diff in the pull request: https://github.com/apache/nifi/pull/548#discussion_r67957067 --- Diff: nifi-nar-bundles/nifi-mqtt-bundle/nifi-mqtt-processors/src/main/java/org/apache/nifi/processors/mqtt/ConsumeMQTT.java --- @@ -288,9 +289,13 @@ public void process(final OutputStream out) throws IOException { String transitUri = new StringBuilder(broker).append(mqttMessage.getTopic()).toString(); session.getProvenanceReporter().receive(messageFlowfile, transitUri); +String uuid = messageFlowfile.getAttribute(CoreAttributes.UUID.key()); --- End diff -- A bit of a nit pick, this is only referenced in the logger statement below so it should be created in there, not outside of it. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] nifi pull request #548: NIFI-2045 - Removing mqtt message from queue after a...
GitHub user brosander opened a pull request: https://github.com/apache/nifi/pull/548 NIFI-2045 - Removing mqtt message from queue after after session.comit() You can merge this pull request into a Git repository by running: $ git pull https://github.com/brosander/nifi NIFI-2045 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/548.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #548 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---