Actions11
Overview
This node interacts with NATS JetStream, a messaging system that supports streaming and message persistence. Specifically, the Stream - List operation retrieves a list of streams managed by JetStream, optionally filtered by a subject pattern.
Use cases include:
- Monitoring available streams in your JetStream server.
- Filtering streams by subject patterns to find relevant data channels.
- Automating workflows based on existing stream configurations.
For example, you might list all streams related to "events.*" to process event-driven messages dynamically.
Properties
| Name | Meaning |
|---|---|
| Subject Filter | Optional subject pattern to filter streams. Leave empty to list all streams. Example: events.> |
Output
The output is an array of JSON objects representing the streams matching the filter criteria. Each object contains details about a stream as returned by the JetStream management API, such as stream name, subjects, configuration, and status.
No binary data is output by this operation.
Example output snippet (simplified):
[
{
"name": "EVENTS_STREAM",
"subjects": ["events.>"],
"config": { /* stream configuration details */ },
"state": { /* stream state information */ }
},
...
]
Dependencies
- Requires connection to a NATS JetStream server.
- Needs an API key credential configured in n8n for authenticating with the NATS server.
- Uses bundled NATS client libraries internally.
- No additional environment variables are required beyond the API credential.
Troubleshooting
Common issues:
- Connection failures due to incorrect or missing API credentials.
- Invalid subject filter patterns causing errors.
- Unknown resource or operation errors if parameters are misconfigured.
Error messages:
"NATS JetStream operation failed: ..."indicates a failure during communication with the JetStream server. Check network connectivity and credentials."Unknown stream operation: list"would indicate a misconfiguration or unsupported operation; ensure the operation name is correct.- Validation errors on subject filters may occur if the pattern syntax is invalid.
To resolve these, verify your credentials, confirm the subject filter syntax, and ensure the node parameters match supported values.