Actions11
Overview
This node manages NATS JetStream streams, consumers, and messages. Specifically for the Stream Delete operation, it deletes an existing JetStream stream by its name. This is useful when you want to clean up or remove obsolete streams from your JetStream server to free resources or reorganize your messaging infrastructure.
Practical examples include:
- Removing a test or temporary stream after automated testing.
- Deleting a stream that is no longer needed in a production environment.
- Managing lifecycle of streams dynamically based on application logic.
Properties
| Name | Meaning |
|---|---|
| Stream Name | The name of the JetStream stream to delete. Stream names should be descriptive to clearly identify their purpose. |
Output
The output JSON contains the result of the delete operation. Typically, this will confirm whether the stream was successfully deleted or provide error details if the deletion failed.
Example output structure (conceptual):
{
"success": true,
"streamName": "EVENTS"
}
If an error occurs, the output JSON will contain an error field describing the issue.
Dependencies
- Requires a connection to a NATS server with JetStream enabled.
- Needs an API key credential or equivalent authentication configured in n8n to connect securely to the NATS server.
- Uses bundled NATS client libraries internally to perform operations.
Troubleshooting
Common issues:
- Attempting to delete a non-existent stream will likely cause an error.
- Insufficient permissions or incorrect credentials can prevent successful connection or deletion.
- Network connectivity problems between n8n and the NATS server may cause failures.
Error messages:
"Unknown stream operation: delete"— indicates the operation name might be misspelled or unsupported; ensure "delete" is selected correctly."NATS JetStream operation failed: <details>"— generic failure message; check credentials, network, and stream existence."Stream not found"or similar errors indicate the specified stream does not exist.
Resolutions:
- Verify the stream name is correct and exists on the JetStream server.
- Confirm credentials and network access are properly configured.
- Use the node’s error output to debug specific issues.