简体   繁体   中英

How to register a DB failover callback in SOCI?

I connect to the database using the SOCI library and I want to obtain database fail-over events for logging purposes. I'm not sure what interface to implement and how to do the callback registration. Is there such support in SOCI?

The only failover notifications supported by SOCI are for connections.

The failover_callback interface can be used as a callback channel for notifications of events that are automatically processed when the session is forcibly closed due to connectivity problems.

See the interface details at https://github.com/SOCI/soci/blob/master/docs/connections.md

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM