Home/
Manual/
monitoring / sdamsubscriber/ MongoDB\Driver\Monitoring\SDAMSubscriber::topologyChanged
MongoDB\Driver\Monitoring\SDAMSubscriber::topologyChanged
PHP function
Edit on GitHub ✎
(mongodb >=1.13.0)
Notification method for a topology description change
Description
MongoDB\Driver\Monitoring\SDAMSubscriber::topologyChanged(MongoDB\Driver\Monitoring\TopologyChangedEvent $event): void
If the subscriber is registered, this method is called when the topology's description changes. For example, a topology discovering a new replica set primary would cause its topology description to change.
Parameters
event(MongoDB\Driver\Monitoring\TopologyChangedEvent)An event object encapsulating information about the changed topology description.
Return Values
Void
Errors/Exceptions
See Also
MongoDB\Driver\Monitoring\TopologyChangedEventMongoDB\Driver\Monitoring\addSubscriber()MongoDB\Driver\Manager::addSubscriber()