Redis Enhanced icon

Redis Enhanced

Get, send and update data in Redis with enhanced operations

Overview

The "Redis Enhanced" node provides a comprehensive interface to interact with a Redis database, supporting a wide range of operations including data retrieval, modification, and management. Specifically, the "Blocking Pop Left" operation allows the node to perform a blocking pop from the left side of a Redis list. This means it waits for an element to become available on the specified list and then removes and returns that element.

This operation is beneficial in scenarios where you want to implement queue-like behavior with Redis lists, such as processing tasks or messages asynchronously. For example, a workflow could wait for new jobs pushed into a Redis list by other systems and process them as they arrive, ensuring efficient resource usage by blocking until data is available.

Properties

Name Meaning
List Name of the Redis list from which to perform the blocking pop (required).
Timeout Number of seconds to wait for an element before timing out; 0 means wait indefinitely.
Name The property name under which the popped value will be stored in the output JSON.
Value Is JSON Whether the popped value should be parsed as JSON or treated as a plain string (default true).

Output

The node outputs an array of items, each containing a json object with the following structure for the "Blocking Pop Left" operation:

  • A property named as specified by the "Name" input property, containing the popped element's value. If the value is valid JSON and "Value Is JSON" is true, it will be parsed into an object; otherwise, it remains a string.
  • A list property indicating the name of the Redis list from which the element was popped.
  • If no element is available within the timeout period, the property will be set to null.

No binary data output is produced by this operation.

Example output JSON snippet:

{
  "propertyName": {
    "someKey": "someValue"
  },
  "list": "myList"
}

or if no element was popped (timeout):

{
  "propertyName": null
}

Dependencies

  • Requires a Redis server accessible via credentials configured in n8n.
  • Needs an API key or authentication token credential for connecting to Redis.
  • Uses the Redis client library internally to communicate with the Redis instance.

Troubleshooting

  • Timeouts: If the node appears to hang, check the "Timeout" setting. Setting it to 0 causes indefinite waiting; consider using a positive timeout to avoid long waits.
  • Parsing Errors: If the popped value is not valid JSON but "Value Is JSON" is enabled, parsing will fail silently and the raw string will be used instead.
  • Connection Issues: Errors related to connection failures usually indicate incorrect Redis credentials or network issues. Verify credentials and connectivity.
  • Empty Lists: If the list is empty and the timeout expires, the output property will be null. Ensure the list name is correct and that producers are pushing data.

Common error messages:

  • Connection refused or timeout errors: Check Redis server availability and credentials.
  • Invalid JSON parse errors: Disable "Value Is JSON" if the data is plain strings.

Links and References

Discussion