ConfD User Community

Confd_connect() vs cdb_connect() vs maapi_connect()


#1

Want to know difference between below API’s. User guide says, all will connect to Confd.

confd_connect()
cdb_connect()
maapi_connect()

Each will have different sockets to connect. Like cdb_connect() can have data and subscription socket.

But what to know these different types of connect and where it will be connected.
Sorry, if its a silly doubt.


#2

There’s not much more to say. The different functions all sets up connections to ConfD for different purposes:

  • confd_connect() - establish a data provider connection to the ConfD daemon, e.g. for applications that provides operational state, implements actions, etc.
  • cdb_connect() - establish a CDP subscriber connection to ConfD, e.g. an app that subscribes for configuration data from CDB.
  • maapi_connect() - establish a management agent connection to the ConfD daemon, e.g. for validation callbacks, transaction os set hooks, transformation callbacks etc.

#3

Okay. Thank you :slight_smile: :slight_smile: