ANNOUNCEMENT: Voyage AI joins MongoDB to power more accurate and trustworthy AI applications on Atlas.
Learn more
Docs Menu

MongoDB\Client::removeSubscriber()

New in version 1.18.

MongoDB\Client::removeSubscriber()

Unregisters a monitoring event subscriber with this Client.

function removeSubscriber(MongoDB\Driver\Monitoring\Subscriber $subscriber): void
$subscriber : MongoDB\Driver\Monitoring\Subscriber
A monitoring event subscriber to unregister with this Client.

MongoDB\Exception\InvalidArgumentException for errors related to the parsing of parameters or options.

If $subscriber is not registered with this Client, this function is a no-op.