Mongo.StreamingHelloMonitor (mongodb-driver v1.4.0) View Source

See https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.rst#streaming-protocol

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.

Link to this section 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.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

connected(connection, me)

View Source

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.