From 18bf88fc5aed7586249319af690fb5c09451ad03 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Tue, 6 Jul 2021 10:19:52 -0400 Subject: Use separate subscription for heartbeats Separated the heartbeat processing onto its own POLICY-HEARTBEAT topic, still on the "real" (i.e., "effective") POLICY-PDP-PAP topic, like we had originally been doing with the statistics. With this change, statistics processing continues to be part of the heartbeat class/processing, thus a separate class is not required to listen for, and handle, statistics. This new subscription uses a shared consumer group so that only one PAP will process any given heartbeat message, which should reduce the likelihood of DB contention and duplicate keys. This also means that the "saveStatisticsInDb" flag will still be used, which is a more obvious mechanism for controlling the storing of statistics than the presence/absence of a topic in the config file. Issue-ID: POLICY-3460 Change-Id: Ia07132b1c7aef006af86fddbe677fb1243a4e2c3 Signed-off-by: Jim Hahn --- .../policy-pap-tarball/src/main/resources/etc/defaultConfig.json | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'packages/policy-pap-tarball/src/main/resources') diff --git a/packages/policy-pap-tarball/src/main/resources/etc/defaultConfig.json b/packages/policy-pap-tarball/src/main/resources/etc/defaultConfig.json index 2f37cb66..94315bb6 100644 --- a/packages/policy-pap-tarball/src/main/resources/etc/defaultConfig.json +++ b/packages/policy-pap-tarball/src/main/resources/etc/defaultConfig.json @@ -35,6 +35,14 @@ "servers" : [ "message-router" ], "topicCommInfrastructure" : "dmaap", "fetchTimeout": 15000 + }, + { + "topic" : "POLICY-HEARTBEAT", + "effectiveTopic": "POLICY-PDP-PAP", + "consumerGroup": "policy-pap", + "servers" : [ "message-router" ], + "topicCommInfrastructure" : "dmaap", + "fetchTimeout": 15000 }], "topicSinks" : [{ "topic" : "POLICY-PDP-PAP", -- cgit 1.2.3-korg