Universal Messaging Scheduling : Realm Triggers Example
scheduler realmSchedule {
declare Realm myRealm ("productionmaster");
declare Config myGlobalConfig ( "GlobalValues");
when (Realm.connections> 1000) {
Logger.report("Reached 1000 connections, setting max connections");
myGlobalConfig.MaxNoOfConnections(1000);
}
when (Realm.eventsSentPerSecond> 10000) {
Logger.report("Reached 10000 events per second, reducing max connection count by 100");
myGlobalConfig.MaxNoOfConnections("-100");
}
}