NATS JetStream icon

NATS JetStream

Manage NATS JetStream streams, consumers, and publish messages

Actions11

Overview

This node interacts with NATS JetStream, a messaging system that supports streaming data. Specifically, the "Get Info" operation under the "Stream" resource retrieves detailed information about a specified JetStream stream. This is useful for monitoring or managing streams by fetching their current configuration and status.

Practical examples include:

  • Checking the configuration of an existing stream before updating it.
  • Retrieving metadata such as subjects bound to the stream or retention policies.
  • Auditing stream details in automated workflows.

Properties

Name Meaning
Stream Name The name of the JetStream stream to get information about. Stream names should be descriptive to clearly identify their purpose.

Output

The output is a JSON object containing detailed information about the requested JetStream stream. This typically includes the stream's configuration, subjects it listens to, retention policies, message counts, and other metadata describing the stream's state.

No binary data output is involved in this operation.

Dependencies

  • Requires a valid connection to a NATS server with JetStream enabled.
  • Needs an API key credential configured in n8n for authenticating with the NATS server.
  • Uses bundled NATS client libraries to interact with the JetStream management API.

Troubleshooting

  • Common issues:

    • Providing a non-existent stream name will likely result in an error indicating the stream was not found.
    • Network connectivity problems to the NATS server can cause operation failures.
    • Insufficient permissions on the API key may prevent retrieving stream info.
  • Error messages:

    • "Unknown stream operation: getInfo" — indicates the operation name is incorrect or unsupported.
    • "NATS JetStream operation failed: <error message>" — generic failure; check credentials, network, and stream existence.
  • Resolutions:

    • Verify the stream name is correct and exists on the JetStream server.
    • Ensure the API key has appropriate permissions.
    • Confirm network access to the NATS server endpoint.

Links and References

Discussion