This commit is contained in:
Wolfgang Hottgenroth
2017-11-15 18:22:51 +01:00
parent d25c40b0aa
commit 9b8df1b119
4 changed files with 4 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
public abstract class AMessageParser { public abstract class AMessageParser {
private String topic; private String topic;
private ConcurrentLinkedQueue<List<ADataObject>> queue; protected ConcurrentLinkedQueue<List<ADataObject>> queue;
public AMessageParser(String topic, ConcurrentLinkedQueue<List<ADataObject>> queue) { public AMessageParser(String topic, ConcurrentLinkedQueue<List<ADataObject>> queue) {
this.topic = topic; this.topic = topic;

View File

@@ -75,6 +75,9 @@ public class MBusParser extends AMessageParser {
for (ADataObject ado : measurementItems) { for (ADataObject ado : measurementItems) {
System.out.println(ado); System.out.println(ado);
} }
queue.add(measurementItems);
System.out.println("Queue size: " + queue.size());
} catch (Exception e) { } catch (Exception e) {
System.out.println("Exception when handling mbus message: " + e); System.out.println("Exception when handling mbus message: " + e);
} }