Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AlarmStateInitializer to store most recent kafka records from the alarm state topic #3079

Merged
merged 4 commits into from
Jul 23, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ private void checkUpdates()
final ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(100));
for (final ConsumerRecord<String, String> record : records)
{
if (record.key().length() < 2)
if (record.key().length() < 6)
{
logger.log(Level.WARNING, "Invalid key, expecting type:path, got " + record.key());
continue;
}
final String type = record.key().substring(0, 2);
final String type = record.key().substring(0, 6);
// Only handle state updates
if (type.equals(AlarmSystem.STATE_PREFIX))
{
final String path = record.key().substring(3);
final String path = record.key().substring(6);
final String node_config = record.value();
try
{
Expand Down
Loading