Actions11
Overview
This node manages NATS JetStream consumers, streams, and messages. Specifically, for the Consumer - Get Info operation, it retrieves detailed information about a specific consumer associated with a JetStream stream. This is useful when you want to inspect the configuration or status of a consumer, such as its delivery policy, acknowledgment settings, or current state.
Practical examples include:
- Monitoring consumer configurations in a message streaming system.
- Debugging issues related to message consumption by checking consumer details.
- Automating audits or reporting on JetStream consumers in your infrastructure.
Properties
| Name | Meaning |
|---|---|
| Stream Name | The name of the JetStream stream to which the consumer belongs. Must exist beforehand. |
| Consumer Name | The name of the consumer whose information you want to retrieve. |
Output
The output JSON contains detailed information about the specified consumer. This typically includes the consumer's configuration, status, and metadata as returned by the JetStream management API. The exact structure depends on the JetStream server response but generally covers:
- Consumer configuration parameters (e.g., delivery policy, ack policy).
- Current state metrics (e.g., number of pending messages).
- Metadata such as creation time and sequence numbers.
No binary data output is involved in this operation.
Dependencies
- Requires a valid connection to a NATS JetStream server.
- Needs an API key credential configured in n8n for authenticating with the NATS server.
- The target JetStream stream must already exist before querying consumer info.
Troubleshooting
Common Issues:
- Stream does not exist: If the specified stream name is incorrect or missing, the operation will fail.
- Consumer not found: If the consumer name does not exist on the given stream, an error will be thrown.
- Authentication failure: Invalid or missing credentials will prevent connection to the NATS server.
Error Messages:
"Unknown consumer operation: get"— indicates the operation name is invalid or unsupported."NATS JetStream operation failed: <error message>"— generic failure; check connectivity, credentials, and parameter correctness.
Resolutions:
- Verify that the stream and consumer names are correct and exist on the JetStream server.
- Ensure the API key credential is properly set up and has sufficient permissions.
- Confirm network connectivity to the NATS server.