Federal Site Event Server Plugin

Hi,

We have federal site setup and event server plugin.

We need to monitor events from both site event servers from master site, how can this be achieved?

event server plugin need to monitor both site event and decide to act upon some conditions.

I am guessing the MultiSiteStatusViewer sample can show you the answer.

Have followed the same in Admin plugin, but in background plugin when asked mastersite.getChildren always returns 0 child;

In the Event Server plugin, what is it you are asking / requesting?

Note the MultiSiteStatusViewer shows how to connect to multiple Event Server and get events. Naturally you can in an Event Server plugin only get events from the one Event Server.

Maybe we should step back and understand what it is you intend to do. Please describe what you intend to do.

@Bo Ellegård Andersen (Milestone Systems)​ The below code is used

  MessageCommunicationManager.Start(EnvironmentManager.Instance.MasterSite.ServerId);

  \_messageCommunicationServer = MessageCommunicationManager.Get(EnvironmentManager.Instance.MasterSite.ServerId);

  \_messageEventRegistrationObjects.Add(\_messageCommunicationServer.RegisterCommunicationFilter(NewEvents, new CommunicationIdFilter(MessageId.Server.NewEventIndication)));

  Item MasterSite = EnvironmentManager.Instance.GetSiteItem(EnvironmentManager.Instance.MasterSite);

  List<Item> sites = MasterSite.GetChildren();

  foreach (Item site in sites)

  {

    MessageCommunicationManager.Start(site.FQID.ServerId);

    \_messageCommunicationChild = MessageCommunicationManager.Get(site.FQID.ServerId);        

    \_messageEventRegistrationObjects.Add(\_messageCommunicationChild.RegisterCommunicationFilter(NewEvents, new CommunicationIdFilter(MessageId.Server.NewEventIndication)));

  }

We are trying to register NewEventIndication message from master and child site in the master site event server plugin

But always List sites = MasterSite.GetChildren() returns 0.

Same is working in Admin plugin.

@Bo Ellegård Andersen (Milestone Systems)​ can you answer the request above?

@Bo Ellegård Andersen (Milestone Systems)​ Waiting for reply

The below code is used

  MessageCommunicationManager.Start(EnvironmentManager.Instance.MasterSite.ServerId);

  \_messageCommunicationServer = MessageCommunicationManager.Get(EnvironmentManager.Instance.MasterSite.ServerId);

  \_messageEventRegistrationObjects.Add(\_messageCommunicationServer.RegisterCommunicationFilter(NewEvents, new CommunicationIdFilter(MessageId.Server.NewEventIndication)));

  Item MasterSite = EnvironmentManager.Instance.GetSiteItem(EnvironmentManager.Instance.MasterSite);

  List<Item> sites = MasterSite.GetChildren();

  foreach (Item site in sites)

  {

    MessageCommunicationManager.Start(site.FQID.ServerId);

    \_messageCommunicationChild = MessageCommunicationManager.Get(site.FQID.ServerId);        

    \_messageEventRegistrationObjects.Add(\_messageCommunicationChild.RegisterCommunicationFilter(NewEvents, new CommunicationIdFilter(MessageId.Server.NewEventIndication)));

  }

We are trying to register NewEventIndication message from master and child site in the master site event server plugin

But always List sites = MasterSite.GetChildren() returns 0.

Same is working in Admin plugin.

I was able to do the same observations.

The explanation must be that the Event Server environment is special and ignores federated child sites in the current implementation of GetSiteItem.

Will the support be added. if so when?

The Event Server implementation is focused on supported one site. Making the Event Server in general understand the entire MFA hierarchy will overload the top sites.

Also, when using MessageCommunication the Event Server has a static address, so addressing multiple Event Servers need careful implementation.

My recommendation is, that you create your own service to communicate with all Event Servers. This service would probably login to the top site and retrieve the entire hierarchy and keep login (Token) updated per server, and keep a MessageCommunication class per EventServer as you have documented in previous post.

Component integration(multisitestatusviewer example) is able to connect to all the child sites and capture the event and serves the purpose, but we have one doubt can the component integration access the configuration saved by plugin integration.

Thank you for the suggestion.

Yes, the Component solution can access plugin configuration for each site. The ServerId for the site is given in the GetItemConfiguration. You will have to manage each site’s configuration by itself.