I have a subscriber app which on receiving a set of changes from confd in the form of subscription points, saves them in memory in another format. This is required to send responses to other clients of the subscriber app.
Now, when this subscriber app is restarted, I would like to reload the configuration stored till now in confd into the subscriber app as part of say ‘startup’ action.
From the user guide I see being mentioned on similar lines, but that is only for confd restart, not for subscribing app restart.
Is there any API set provided for this sort of thing ?
When a subscriber restarts, it needs to read the configuration again from CDB.
There are 2 “major” ways of doing this:
1- Read the whole configuration using CDB APIs.
2- Trigger the configuration change notification: in which ConfD will follow the same path followed when data changes: meaning, you don’t have to write a separate function just to read the whole configuration for your subscription. You can rely on the code that handles configuration change that you already have.
int cdb_trigger_subscriptions(int sock, int sub_points, int len);