To use CUBRID HA in CCI, you must connect it to the broker by using the cci_connect_with_url function, which is used to specify the connection information of the failover broker in the connection URL. The attributes specified for CUBRID HA include althosts which is the information of more than one broker node to be connected when a failure occurs and rctime which is the reconnection interval after the recovery of a failed broker.
The following example shows how to configure CCI.
con = cci_connect_with_url ("cci:cubrid:primary_broker:33000:demodb:::?althosts=secondary_broker:33000&rctime=30", "dba", NULL);
if (con < 0)
{
printf ("cannot connect to database\n");
return 1;
}