Hi,
I am just trying to work out what the best way in doing the following..
I have many devices that send a UDP message to my B4J app every 30 seconds.
I want to create a connection check feature so I can send a email if it fails to receive 6 messages. (3 minutes).
For example:
A message is sent every 30 seconds.
If it fails to get 6 message in a row to send a email to say connection lost. (I already have the email side of things working as well as the UDP side of things.)
I am logging each connection in a map. ConnectionID and last connection time.
I was thinking of creating a timer to check each any every ConnectionID for the last command time every 10-20 seconds, and comparing the time difference and if it's more than 3 minutes send a email.
Or, the other way I was thinking of using was the CallSubUtils, and calling the sub with the ConnectionID to check the connection in 3 minutes time to see if it has changed.
There could be 200-300 devices that send UDP messages to my B4J app. So using CallSubUtils might run a lot of timers in the background? And using a timer to check all connections at the one time might slow things down? I am not sure if that is a good idea or not.
Anyone have any suggestions on how to check if there has been a connection within 3 minutes ?