NATS KV icon

NATS KV

Interact with NATS JetStream Key-Value Store - manage buckets and keys

Actions8

Overview

This node interacts with the NATS JetStream Key-Value (KV) Store, specifically managing KV buckets and keys within those buckets. The "Delete" operation on the "Bucket" resource allows users to delete an entire KV bucket from the NATS JetStream system.

Common scenarios for this node include:

  • Automating cleanup of unused or temporary KV buckets.
  • Managing lifecycle of data storage buckets in NATS JetStream as part of a larger workflow.
  • Integrating NATS KV management into CI/CD pipelines or operational dashboards.

For example, you might use this node to delete a bucket named "my-bucket" once its data is no longer needed, freeing up resources and maintaining a tidy KV store.

Properties

Name Meaning
Bucket Name The name of the KV bucket to delete. Bucket names can only contain alphanumeric characters, dashes, and underscores.

Output

The output JSON contains the result of the delete operation on the specified bucket. Typically, it will confirm successful deletion or provide details about the operation's outcome.

If an error occurs (e.g., bucket not found or invalid bucket name), the output will include an error object describing the issue.

No binary data output is involved in this operation.

Dependencies

  • Requires a valid API authentication token credential to connect to the NATS JetStream server.
  • Uses the NATS client library bundled with the node to manage connections and perform operations.
  • The node expects proper configuration of the NATS connection credentials within n8n.

Troubleshooting

  • Invalid Bucket Name: If the bucket name contains invalid characters, the node will throw a validation error. Ensure bucket names only include alphanumeric characters, dashes, and underscores.
  • Unknown Operation: If the operation parameter is incorrect or unsupported, the node will report an "Unknown bucket operation" error.
  • Connection Issues: Failure to connect to the NATS server due to incorrect credentials or network issues will cause errors. Verify your API key and network accessibility.
  • Bucket Not Found: Attempting to delete a non-existent bucket may result in an error. Confirm the bucket exists before deletion.
  • Use the "Continue On Fail" option to handle errors gracefully within workflows.

Links and References

Discussion