View Source Mongo.StreamingHelloMonitor (mongodb-driver v1.5.0)
The streaming protocol is used to monitor MongoDB 4.4+ servers and optimally reduces the time it takes for a client to discover server state changes. Multi-threaded or asynchronous drivers MUST use the streaming protocol when connected to a server that supports the awaitable hello or legacy hello commands. This protocol requires an extra thread and an extra socket for each monitor to perform RTT calculations.
This module implements the streaming protocol. The GenServer is started and maintained by the Monitor process. The streaming hello monitor uses the more to come flag while updating the current server description.
Summary
Functions
Returns a specification to start this module under a supervisor.
Report the connection event, so the topology process can now create the connection pool.
Time to update the topology. Calling hello
and updating the server description
Initialize the monitor process
In this case we stop the DBConnection.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Report the connection event, so the topology process can now create the connection pool.
Time to update the topology. Calling hello
and updating the server description
Initialize the monitor process
In this case we stop the DBConnection.