Docs Menu
Docs Home
/
MongoDB Manual
/ / /

sp.listConnections()

On this page

  • Definition
  • Syntax
  • Command Fields
  • Behavior
  • Access Control
  • Example
  • Learn More
sp.listConnections()

Returns documents for each connection in the connection registry of the current stream processing instance. Each document provides descriptive information including the name and type of each connection.

You can only invoke this command while connected to a stream processing instance.

This command requires mongosh version ≥ 2.0.

The sp.listConnections() method has the following syntax:

sp.listConnections()

sp.listConnections() takes no fields.

sp.listConnections() returns documents describing all of the connections in the connection registry of the current stream processing instance to the shell.

The user running sp.listConnections() must have the atlasAdmin role.

The following example shows an expected response from sp.listConnections():

sp.listStreamProcessors()
1{
2 ok: 1,
3 connections: [
4 { name: 'vt', type: 'atlas', cluster: 'versiontest' },
5 { name: 'testkafka', type: 'kafka' },
6 { name: 'sample_stream_solar', type: 'inmemory' },
7 { name: 'jsncluster0', type: 'atlas', cluster: 'jsncluster0' }
8 ]
9}
  • Manage Stream Processors

Back

sp.createStreamProcessor()