--- a/src/PosixMQCommand.cpp Wed Apr 20 20:59:42 2022 +0200
+++ b/src/PosixMQCommand.cpp Sat Apr 30 23:19:08 2022 +0200
@@ -55,7 +55,8 @@
{L"data", TypeId::STRING}
}, true);
- for (int i = configuration.messageCount; i > 0; i--) {
+ for (int i = configuration.messageCount; continueProcessing && i > 0; i--) {
+ // TODO: maybe rather call mq_timedreceive() inside and check continueProcessing (to be able to stop even when no messages are comming)
std::string message = mq->receive();
writer->writeAttribute(configuration.queue);
@@ -70,4 +71,4 @@
}
}
-}
\ No newline at end of file
+}