You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ad...@apache.org on 2021/11/08 10:00:31 UTC
[nifi-minifi-cpp] 02/02: MINIFICPP-1681 DefragmentText should
trigger when empty if Maximum Buffer Age is set
This is an automated email from the ASF dual-hosted git repository.
adebreceni pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 8914b0cc2c9459761a0bf1b57e0df0c459066d16
Author: Martin Zink <ma...@protonmail.com>
AuthorDate: Mon Nov 8 10:59:37 2021 +0100
MINIFICPP-1681 DefragmentText should trigger when empty if Maximum Buffer Age is set
Signed-off-by: Adam Debreceni <ad...@apache.org>
This closes #1210
---
extensions/standard-processors/processors/DefragmentText.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/extensions/standard-processors/processors/DefragmentText.cpp b/extensions/standard-processors/processors/DefragmentText.cpp
index 04c6f0e..d473445 100644
--- a/extensions/standard-processors/processors/DefragmentText.cpp
+++ b/extensions/standard-processors/processors/DefragmentText.cpp
@@ -69,6 +69,7 @@ void DefragmentText::onSchedule(core::ProcessContext* context, core::ProcessSess
uint64_t max_buffer_age;
if (core::Property::StringToTime(max_buffer_age_str, max_buffer_age, unit) && core::Property::ConvertTimeUnitToMS(max_buffer_age, unit, max_buffer_age)) {
buffer_.setMaxAge(std::chrono::milliseconds(max_buffer_age));
+ setTriggerWhenEmpty(true);
logger_->log_trace("The Buffer maximum age is configured to be %" PRIu64 " ms", max_buffer_age);
}
}