Using C# and 2020R2 SDK
The following code works and I get a callback whenever a new alarm is generated:
MessageCommunication comm = MessageCommunicationManager.Get(EnvironmentManager.Instance.MasterSite.ServerId);
comm.RegisterCommunicationFilter(AlarmHandler, new CommunicationIdFilter(MessageId.Server.NewAlarmIndication), null, EndPointType.Server);
This code is also executed and registers the same handler for changed alarms, however I never get a message when the alarm is closed by a user. What am I doing wrong?
comm.RegisterCommunicationFilter(AlarmHandler, new CommunicationIdFilter(MessageId.Server.ChangedAlarmIndication), null, EndPointType.Server);