Fix for robustness 44/87944/1
authorPatrikBuhr <patrik.buhr@est.tech>
Fri, 17 May 2019 06:19:25 +0000 (06:19 +0000)
committerPatrikBuhr <patrik.buhr@est.tech>
Fri, 17 May 2019 06:19:25 +0000 (06:19 +0000)
commit7b84c15301abbca5ae586a6cbfcf482570a8c35f
tree9dafb73194853ae2dde660c532c2fe2e63dea8f0
parent75d51a299e7d36cb988ef074fce00eb4b29a3394
Fix for robustness

In the long time stability test it has showed that when there are an exessive amount of FileReady events,  the DFC will fetch these from the MR and build up an internal queue.

This has the effect that the DFC will consume too much memory. Itmight also affect load balancing (in case of several DFC instances) so that one might consume all events and the others get nothing.

The DFC should not fetch new FileReady events when it fully loaded with work.

Change-Id: I58665edd678d2f1c8a32d0e56455228b522aab40
Issue-ID: DCAEGEN2-1509
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/service/JsonMessageParser.java
datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasks.java
datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasksTest.java