MONGOC_APM_SE...LOGY_CLOSED_CB(3)

πŸ’… mongoc_apm_set_topology_closed_cb(3) β€” yes bestie, we're talking libmongoc today πŸ’…

okay so picture this: it's from libmongoc, and it's the little callback hook that fires when the driver stops monitoring a server topology and yeets its mongoc_topology_description_t into the void. it's giving cleanup era. it's giving "the party's over, everyone out." πŸŽ€


✨ SYNOPSIS ✨

typedef void (*mongoc_apm_topology_closed_cb_t) (
   const mongoc_apm_topology_closed_t *event);

void
mongoc_apm_set_topology_closed_cb (mongoc_apm_callbacks_t *callbacks,
                                   mongoc_apm_topology_closed_cb_t cb);

so like, the whole point: you get an event notification whenever the driver stops monitoring a server topology and destroys its mongoc_topology_description_t. one last goodbye text, basically πŸ˜­πŸ¦‹


🌸 PARAMETERS 🌸

  • callbacks β€” a mongoc_apm_callbacks_t. that's the callback bag you're stuffing things into, bestie 🫢
  • cb β€” a function to call with a mongoc_apm_topology_closed_t whenever the driver stops monitoring a server topology and destroys its mongoc_topology_description_t. yes, say it with me: stops monitoring ➑️ destroys the topology description ➑️ your callback gets a mongoc_apm_topology_closed_t ✨

πŸ¦‹ SEE ALSO πŸ¦‹

  • Introduction to Application Performance Monitoring β€” go read it, iykyk πŸ‘‘

πŸ’– AUTHOR πŸ’–

MongoDB, Inc β€” the icons themselves 🌈


2009-present, MongoDB, Inc. periodt. no cap, that's the copyright line, we don't argue with it πŸ’…


lowkey reminder: this page is about getting told when the topology monitoring wraps up β€” don't go inventing extra behaviour for it, that's not the vibe πŸ™ˆ

okay bye bestie, this was libmongoc version 2.5.6, dated Oct 09, 2026 β€” slay, drink water, and may your callbacks always fire exactly once when they should πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from