Compare commits

...

3 Commits

Author SHA1 Message Date
Kareem Dabbour
9cc501a8b9 WIFI-3216 using 0 rather than currentMillis() 2021-07-22 17:52:43 -04:00
Kareem Dabbour
b720f9882d WIFI-3216 using currentMillis() rather than 0 2021-07-22 17:39:14 -04:00
Kareem Dabbour
91f113505d WIFI-3216 Made the service metrics' timestamps 0 so that the CloudEventDispatcherController can assign unique TS 2021-07-22 17:09:26 -04:00

View File

@@ -208,8 +208,11 @@ public class MqttStatsPublisher implements StatsPublisherInterface {
if (!metricRecordList.isEmpty()) {
long serviceMetricTimestamp = System.currentTimeMillis();
metricRecordList.stream().forEach(smr -> {
smr.setCreatedTimestamp(serviceMetricTimestamp);
metricRecordList.stream().forEach(smr -> {
// TODO use serviceMetricTimestamp rather than 0. This is done for now since there are some
// channel metrics that have overlapping keys which messes up Cassandra if the same time stamp is used
// and setting it to 0 allows the CloudEventDispatcherController to assign unique time stamps.
smr.setCreatedTimestamp(0);
if (smr.getLocationId() == 0)
smr.setLocationId(locationId);
if (smr.getCustomerId() == 0)