Manage Eventing Functions
- Capella Operational
Use the Capella UI to manage the Eventing Functions in your cluster.
Pause a Function
You can pause an Eventing Function to checkpoint the Function and stop processing document mutations. This checkpoint saves a specific point in the processing stream and helps you not miss any mutations when you resume the Function.
You can edit the JavaScript code of a paused Function.
You can only pause an Eventing Function when that Function has already been deployed. |
To pause an Eventing Function:
-
Go to
. -
Next to the Function you want to pause, click More Options (⋮) .
-
Click Pause.
Resume a Function
You can resume a paused Eventing Function to reactivate and continue processing the Function.
When you resume a Function:
-
The Function starts running from the checkpoint that was saved when you previously paused the Function. This makes sure that no document mutations are missed.
-
All backlogged mutations are processed.
-
All backlogged Timers fire as soon as possible, making sure no Timers are lost.
You cannot edit the JavaScript code of a resumed Function.
To resume an Eventing Function:
-
Go to
. -
Click More Options (⋮) next to the Function you want to resume.
-
Click Resume to resume your Function. A resumed Function enters a deployed state and resumes processing mutations.
Export a Function
You can export an Eventing Function to open and edit the Function with your code editor. The Function exports in JSON format.
To export an Eventing Function:
-
Go to
. -
Click More Options (⋮) next to the Function you want to export.
-
Click Export to export your Function.
-
Go to the Downloads folder on your computer.
-
Open the exported JSON file with your code editor.
Debug with Function Logs
You can use Function logs to identify and capture activities and errors related to your business logic through user-defined messages specific to each Eventing Function.
The content of the Function logs depends on the logic of the log(…)
statements you added inside the Function handler’s JavaScript code.
To check the logs of your deployed Function:
-
Go to
. -
Click the Log icon next to the Function you want to check the logs for.
-
In the Logs page, you can:
-
Filter the log content
-
Reorder the log file
-
Refresh the log data
-
Copy the log data to your clipboard
-
Edit a Function’s JavaScript Code
You can only edit the JavaScript code of an Eventing Function when that Function is paused or undeployed. |
To edit the JavaScript code of an Eventing Function:
-
Go to
. -
Click View JavaScript next to the Function you want to edit.
-
In the code editor page, edit your business logic.
-
Click Save to commit your changes.
Edit Function Settings
To edit the settings of your Eventing Function:
-
Go to
. -
Click Settings next to the Function you want to edit the settings for.
-
Edit the available settings. You can also edit the Function’s bindings and JavaScript code.
-
Click Save.
If your Eventing Function is in a deployed state, you can only edit some of its settings. To edit a larger number of your Function’s settings, undeploy or pause your Function.
Field | Description |
---|---|
Name |
Cannot be edited. |
Source Bucket |
Cannot be edited. |
Source Scope |
Cannot be edited. |
Source Collection |
Cannot be edited. |
Metadata Bucket |
Cannot be edited. |
Metadata Scope |
Cannot be edited. |
Metadata Collection |
Cannot be edited. |
Description |
Can be edited at any time. |
N1QL Consistency |
Can be edited at any time. |
Workers |
Can be edited at any time. |
Script Timeout |
Can be edited at any time. |
Deployment Feed Boundary |
Can only be edited when the Function is in an undeployed or paused state. |
Timer Context Max Size |
Can only be edited when the Function is in an undeployed or paused state. |
Language Compatibility |
Can only be edited when the Function is in an undeployed or paused state. |