When my Agent starts up, I load the keystore files via HttpsProperties.setKeyStore and setTrustStore, per the ADK doc.
My agent launches handlers for each SIF-enabled customer. I periodically poll my database to check for new SIF customers and would like to launch handlers for them as they come online without restarting my agent.
I'm hoping to dynamically add customer cert files to our keystore (am assuming we can use a command line tool in Linux to do this but haven't actually done it yet...), and then I'll need to reload our keystore file in my agent.
Is it possible to reload the keystore file while my agent is running? (i.e. can I repeat the setTrustStore commands I do at startup?) If not, I will need to shut down the agent and restart it everytime a new customer comes online, something I'm trying to avoid.
I could shut down and restart my agent nightly, and everytime it restarts it will load the latest truststore file and start handlers for all SIF customers. But I'm nervous about so much stoping and starting. Might messages be half-processed when I shut down -- is that a concern? Is it common to restart agents nightly?
Thanks,
Miriam
Now that I have the truststore working I was able to test this, and yes - it seems that I CAN reload the truststore on the fly.