I would like to know if there is a way to subscribe to the max ccu reached event (from the server).
Thanks in advance!
MAX CCU Event?
Re: MAX CCU Event?
Hi,
there isn't a specific event, but if you're running an Extension on the server side (for example to handle logins) you could check the current user count there and trigger whatever action you require when the server is almost or entirely full.
If it's a different use case, could you give us more details?
Thanks
there isn't a specific event, but if you're running an Extension on the server side (for example to handle logins) you could check the current user count there and trigger whatever action you require when the server is almost or entirely full.
If it's a different use case, could you give us more details?
Thanks
Re: MAX CCU Event?
Hi Lapo!
Yes, of course, I'll give you more details.
What is my problem? On the 10th, when the error that affected the licenses occurred, I did not receive any immediate notification, and I would like to use all possible means to find out next time.
At first I thought I could subscribe to the MAX CCU event or that in a LoginEventHandler class I would be able to check for errors and take action if the "errorCode" was something like "SERVER_IS_FULL" (or something like that), but I didn't get it .
Then I tried to keep the user count, but to do so I had to be able to obtain the maximum number of ccu of my license to be able to compare (ex: currentUsersLogged < MaxLicenseUsers) and I also did not find this data using the API
On the other hand, I saw that in the "LicenseManager" section there was a "Alert CCU" flag. This flag implies having the "Mailer" configured (if I understood correctly), but, even so, this did not apply to the "Standard Community", so it would not notify me either.
I mention all this to put you in context, maybe there is a much simpler way to get what I want
Thanks in advance!
Yes, of course, I'll give you more details.
What is my problem? On the 10th, when the error that affected the licenses occurred, I did not receive any immediate notification, and I would like to use all possible means to find out next time.
At first I thought I could subscribe to the MAX CCU event or that in a LoginEventHandler class I would be able to check for errors and take action if the "errorCode" was something like "SERVER_IS_FULL" (or something like that), but I didn't get it .
Then I tried to keep the user count, but to do so I had to be able to obtain the maximum number of ccu of my license to be able to compare (ex: currentUsersLogged < MaxLicenseUsers) and I also did not find this data using the API
On the other hand, I saw that in the "LicenseManager" section there was a "Alert CCU" flag. This flag implies having the "Mailer" configured (if I understood correctly), but, even so, this did not apply to the "Standard Community", so it would not notify me either.
I mention all this to put you in context, maybe there is a much simpler way to get what I want
Thanks in advance!
Re: MAX CCU Event?
At the moment there isn't a straightforward way to access the license max CCU from runtime but we can add it to the incoming patch, and the same goes for an event for "Server Full" exception.
The reason why you can't catch the exception yourself in the Extension code is because the check for that condition happens after the Extension LOGIN handler is executed. In other words it's too early to catch that.
Cheers
The reason why you can't catch the exception yourself in the Extension code is because the check for that condition happens after the Extension LOGIN handler is executed. In other words it's too early to catch that.
Cheers
Re: MAX CCU Event?
Okey!
Understood. At first I was hoping to be able to do something like:
addEventHandler(SFSEventType.MAX_CCU, maxCcuEventHandler);
Where I could also query the license type, etc.
I'll wait to see the next patch/update notes.
Thanks Lapo!
Understood. At first I was hoping to be able to do something like:
addEventHandler(SFSEventType.MAX_CCU, maxCcuEventHandler);
Where I could also query the license type, etc.
I'll wait to see the next patch/update notes.
Thanks Lapo!
Re: MAX CCU Event?
Quick update:
Apologies, I forgot to mention that there is actually an alert system that should cover your use case.
In the AdminTool under License Manager, we have a system to fire an email when the number of CCU is approaching the max amount of CCU.
See here for the details:
https://docs2x.smartfoxserver.com/Getti ... nseManager
Cheers
Apologies, I forgot to mention that there is actually an alert system that should cover your use case.
In the AdminTool under License Manager, we have a system to fire an email when the number of CCU is approaching the max amount of CCU.
See here for the details:
https://docs2x.smartfoxserver.com/Getti ... nseManager
Cheers