Definition
New in version 7.0:
Starts a named Stream Processor on the current Stream Processing Workspace.
Compatibility
This method is supported in Atlas Stream Processing Workspaces.
Syntax
The sp.processor.start() method has the following syntax:
sp.processor.start( { <options> } )
Command Fields
sp.processor.start() takes a generic, optional <options> document whose fields are passed to the underlying start command. These fields can be:
Field | Type | Necessity | Description |
|---|---|---|---|
| token | Conditional | |
| timestamp | Conditional | |
| string | Optional | The tier to which Atlas Stream Processing assigns the processor. If you do not declare this option, Atlas Stream Processing assigns the processor to the Stream Processing Workspace's tier. Must be one of the following:
To learn more, see Tiers. |
| object | Optional | Object that enables and configures vertical autoscaling for the processor. To learn more, see Enable and Configure Autoscaling. |
| boolean | Conditional | Turns autoscaling on or off. Required when you set |
| string | Optional | The lowest tier the processor can scale down to. If you don't specify this field, Atlas Stream Processing uses the lower of the Stream Processing Workspace default tier and the tier that you start the processor on. |
| string | Optional | The highest tier the processor can scale up to. If you don't specify this field, Atlas Stream Processing uses the Stream Processing Workspace maximum tier size. |
| boolean | Optional | Specifies whether this start request skips checkpoint recovery. When set to |
| boolean | Optional | Specifies if the processor resumes from its most recent checkpoint when it starts. By default, this field is |
Behavior
sp.processor.start() starts a named stream processor on the current stream processing workspace. The stream processor must be in a STOPPED state. If you invoke sp.processor.start() for a stream processor that is not STOPPED, mongosh will return an error.
Access Control
The user running sp.processor.start() must have the atlasAdmin role.
Example
The following example starts a stream processor named solarDemo.
sp.solarDemo.start()